VERSION 5.00
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#8.0#0"; "CRViewer.dll"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmMaintCustomer 
   BackColor       =   &H00F7D9C2&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   8535
   ClientLeft      =   1785
   ClientTop       =   120
   ClientWidth     =   11115
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   8535
   ScaleWidth      =   11115
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.StatusBar sbRS 
      Align           =   2  'Align Bottom
      Height          =   270
      Left            =   0
      TabIndex        =   0
      Top             =   8265
      Width           =   11115
      _ExtentX        =   19606
      _ExtentY        =   476
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin ITGControls.ITGTab SSTab2 
      Height          =   4110
      Left            =   15
      TabIndex        =   42
      Top             =   1020
      Width           =   11025
      _ExtentX        =   19447
      _ExtentY        =   7250
      TabCount        =   2
      TabCaption(0)   =   "               Main               "
      TabContCtrlCnt(0)=   1
      Tab(0)ContCtrlCap(1)=   "ComunionFrames1"
      TabCaption(1)   =   "               List               "
      TabContCtrlCnt(1)=   1
      Tab(1)ContCtrlCap(1)=   "dtgList"
      TabTheme        =   2
      ActiveTabBackStartColor=   16250865
      ActiveTabBackEndColor=   16243138
      InActiveTabBackStartColor=   16243138
      InActiveTabBackEndColor=   16243138
      InActiveTabForeColor=   0
      BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      OuterBorderColor=   4210752
      TopLeftInnerBorderColor=   4210752
      BottomRightInnerBorderColor=   4210752
      DisabledTabBackColor=   16243138
      DisabledTabForeColor=   -2147483630
      Begin VB.Frame Frame1 
         BackColor       =   &H00F7D9C2&
         BorderStyle     =   0  'None
         Caption         =   "Frame1"
         Height          =   495
         Left            =   -74865
         TabIndex        =   53
         Top             =   3120
         Width           =   7800
      End
      Begin MSDataGridLib.DataGrid dtgList 
         Height          =   3510
         Left            =   -74970
         TabIndex        =   38
         Top             =   345
         Width           =   10965
         _ExtentX        =   19341
         _ExtentY        =   6191
         _Version        =   393216
         AllowUpdate     =   0   'False
         AllowArrows     =   -1  'True
         Appearance      =   0
         HeadLines       =   1
         RowHeight       =   15
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   5
         BeginProperty Column00 
            DataField       =   "cCode"
            Caption         =   "Client ID"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "cName"
            Caption         =   "Client Name"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cSman"
            Caption         =   "Salesman"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "cMSCode"
            Caption         =   "Market Segment"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "cCustomerType"
            Caption         =   "Customer Type"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            AllowRowSizing  =   0   'False
            BeginProperty Column00 
               ColumnAllowSizing=   -1  'True
               Locked          =   -1  'True
               ColumnWidth     =   1695.118
            EndProperty
            BeginProperty Column01 
               Locked          =   -1  'True
               ColumnWidth     =   4064.882
            EndProperty
            BeginProperty Column02 
               Locked          =   -1  'True
            EndProperty
            BeginProperty Column03 
               Locked          =   -1  'True
            EndProperty
            BeginProperty Column04 
               Locked          =   -1  'True
               ColumnWidth     =   1635.024
            EndProperty
         EndProperty
      End
      Begin ITGControls.ComunionFrames ComunionFrames1 
         Height          =   3765
         Left            =   0
         Top             =   345
         Width           =   11025
         _ExtentX        =   19447
         _ExtentY        =   6641
         FrameColor      =   4210752
         BackColor       =   16243138
         FillColor       =   16243138
         RoundedCorner   =   0   'False
         Caption         =   "Information"
         Alignment       =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ThemeColor      =   5
         ColorFrom       =   16243138
         ColorTo         =   16250865
         Begin VB.ComboBox cboType 
            Height          =   315
            ItemData        =   "frmMaintCustomer.frx":0000
            Left            =   8790
            List            =   "frmMaintCustomer.frx":0002
            Style           =   2  'Dropdown List
            TabIndex        =   3
            Top             =   510
            Width           =   1785
         End
         Begin VB.Timer Timer1 
            Interval        =   300
            Left            =   8835
            Top             =   900
         End
         Begin ITGControls.ITGTab SSTab3 
            Height          =   2550
            Left            =   0
            TabIndex        =   40
            Top             =   1215
            Width           =   11025
            _ExtentX        =   19447
            _ExtentY        =   4498
            TabCount        =   2
            TabCaption(0)   =   "          Company          "
            TabContCtrlCnt(0)=   20
            Tab(0)ContCtrlCap(1)=   "cmdPickProv"
            Tab(0)ContCtrlCap(2)=   "cmdPickCity"
            Tab(0)ContCtrlCap(3)=   "cmdPickCode"
            Tab(0)ContCtrlCap(4)=   "txtGroupCode"
            Tab(0)ContCtrlCap(5)=   "txtAddress"
            Tab(0)ContCtrlCap(6)=   "txtFax"
            Tab(0)ContCtrlCap(7)=   "txtInternet"
            Tab(0)ContCtrlCap(8)=   "txtEMail1"
            Tab(0)ContCtrlCap(9)=   "txtContact"
            Tab(0)ContCtrlCap(10)=   "txtDescription"
            Tab(0)ContCtrlCap(11)=   "txtGroupName"
            Tab(0)ContCtrlCap(12)=   "txtCity"
            Tab(0)ContCtrlCap(13)=   "txtState"
            Tab(0)ContCtrlCap(14)=   "txtZip"
            Tab(0)ContCtrlCap(15)=   "txtPhone1"
            Tab(0)ContCtrlCap(16)=   "cboCountry"
            Tab(0)ContCtrlCap(17)=   "txtCountry"
            Tab(0)ContCtrlCap(18)=   "txtPhone2"
            Tab(0)ContCtrlCap(19)=   "txtEMail2"
            Tab(0)ContCtrlCap(20)=   "Label7"
            TabCaption(1)   =   "          Individual          "
            TabContCtrlCnt(1)=   21
            Tab(1)ContCtrlCap(1)=   "txtSAddress"
            Tab(1)ContCtrlCap(2)=   "txtLastName"
            Tab(1)ContCtrlCap(3)=   "txtCompany"
            Tab(1)ContCtrlCap(4)=   "txtSCity"
            Tab(1)ContCtrlCap(5)=   "txtSState"
            Tab(1)ContCtrlCap(6)=   "txtSZip"
            Tab(1)ContCtrlCap(7)=   "cboSCountry"
            Tab(1)ContCtrlCap(8)=   "ITGcmdBrowsePicture"
            Tab(1)ContCtrlCap(9)=   "ITGcmdClearPicture"
            Tab(1)ContCtrlCap(10)=   "ITGcmdShowPicture"
            Tab(1)ContCtrlCap(11)=   "ITGchkAutoPicture"
            Tab(1)ContCtrlCap(12)=   "txtSCountry"
            Tab(1)ContCtrlCap(13)=   "txtFirstName"
            Tab(1)ContCtrlCap(14)=   "txtMI"
            Tab(1)ContCtrlCap(15)=   "txtJobTitle"
            Tab(1)ContCtrlCap(16)=   "cd"
            Tab(1)ContCtrlCap(17)=   "Label5"
            Tab(1)ContCtrlCap(18)=   "Label3"
            Tab(1)ContCtrlCap(19)=   "Label1"
            Tab(1)ContCtrlCap(20)=   "imgEmployee"
            Tab(1)ContCtrlCap(21)=   "Label4"
            TabTheme        =   2
            ActiveTabBackEndColor=   16243138
            InActiveTabBackStartColor=   16243138
            InActiveTabBackEndColor=   16243138
            BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            OuterBorderColor=   4210752
            TopLeftInnerBorderColor=   4210752
            BottomRightInnerBorderColor=   4210752
            DisabledTabBackColor=   16243138
            DisabledTabForeColor=   -2147483630
            Begin VB.CommandButton cmdPickProv 
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   300
               Left            =   7050
               Picture         =   "frmMaintCustomer.frx":0004
               Style           =   1  'Graphical
               TabIndex        =   10
               Top             =   780
               Width           =   315
            End
            Begin VB.CommandButton cmdPickCity 
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   300
               Left            =   4140
               Picture         =   "frmMaintCustomer.frx":014E
               Style           =   1  'Graphical
               TabIndex        =   8
               Top             =   780
               Width           =   315
            End
            Begin VB.CommandButton cmdPickCode 
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Height          =   270
               Left            =   3075
               Picture         =   "frmMaintCustomer.frx":0298
               Style           =   1  'Graphical
               TabIndex        =   16
               Top             =   1980
               Width           =   315
            End
            Begin ITGControls.ITGTextBox txtGroupCode 
               Height          =   285
               Left            =   195
               TabIndex        =   15
               Tag             =   "C"
               Top             =   1980
               Width           =   2850
               _ExtentX        =   4815
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               Label           =   "Parent Company"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   1380
            End
            Begin ITGControls.ITGTextBox txtAddress 
               Height          =   285
               Left            =   195
               TabIndex        =   6
               Tag             =   "C"
               Top             =   480
               Width           =   7185
               _ExtentX        =   12462
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14745599
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Mandatory       =   -1  'True
               Label           =   "Address"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   5715
               Required        =   -1  'True
            End
            Begin ITGControls.ITGTextBox txtFax 
               Height          =   285
               Left            =   7635
               TabIndex        =   20
               Tag             =   "C"
               Top             =   1080
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   20
               Label           =   "Fax"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   900
               TextBoxWidth    =   1845
            End
            Begin ITGControls.ITGTextBox txtInternet 
               Height          =   285
               Left            =   7635
               TabIndex        =   21
               Tag             =   "C"
               Top             =   1380
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Website"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   900
               TextBoxWidth    =   1845
            End
            Begin ITGControls.ITGTextBox txtEMail1 
               Height          =   285
               Left            =   7635
               TabIndex        =   22
               Tag             =   "C"
               Top             =   1680
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "E-Mail 01"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   900
               TextBoxWidth    =   1845
            End
            Begin ITGControls.ITGTextBox txtContact 
               Height          =   285
               Left            =   195
               TabIndex        =   13
               Tag             =   "C"
               Top             =   1380
               Width           =   7185
               _ExtentX        =   12462
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Contact"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   5715
            End
            Begin ITGControls.ITGTextBox txtDescription 
               Height          =   285
               Left            =   195
               TabIndex        =   14
               Tag             =   "C"
               Top             =   1680
               Width           =   7185
               _ExtentX        =   12462
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Business Type"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   5715
            End
            Begin ITGControls.ITGTextBox txtGroupName 
               Height          =   285
               Left            =   3390
               TabIndex        =   17
               Top             =   1980
               Width           =   3990
               _ExtentX        =   6932
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Locked          =   -1  'True
               Label           =   "ITGtext"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   3930
               Enabled         =   0   'False
            End
            Begin ITGControls.ITGTextBox txtCity 
               Height          =   285
               Left            =   195
               TabIndex        =   7
               Tag             =   "C"
               Top             =   780
               Width           =   3915
               _ExtentX        =   6694
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               MaxLength       =   50
               Label           =   "City / Province"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   2445
            End
            Begin ITGControls.ITGTextBox txtState 
               Height          =   285
               Left            =   4470
               TabIndex        =   9
               Tag             =   "C"
               Top             =   780
               Width           =   2550
               _ExtentX        =   4392
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               AllCaps         =   -1  'True
               MaxLength       =   50
               Label           =   "Street"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   2490
            End
            Begin ITGControls.ITGTextBox txtZip 
               Height          =   285
               Left            =   5835
               TabIndex        =   12
               Tag             =   "C"
               Top             =   1080
               Width           =   1545
               _ExtentX        =   2619
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   10
               Label           =   "Street"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   1485
            End
            Begin ITGControls.ITGTextBox txtPhone1 
               Height          =   285
               Left            =   7635
               TabIndex        =   18
               Tag             =   "C"
               Top             =   480
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   20
               Label           =   "Phone 01"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   900
               TextBoxWidth    =   1845
            End
            Begin VB.ComboBox cboCountry 
               Height          =   315
               Left            =   1635
               Style           =   2  'Dropdown List
               TabIndex        =   11
               Top             =   1065
               Width           =   4200
            End
            Begin ITGControls.ITGTextBox txtCountry 
               Height          =   285
               Left            =   4290
               TabIndex        =   44
               Tag             =   "cboCountry"
               Top             =   1080
               Visible         =   0   'False
               Width           =   1335
               _ExtentX        =   2249
               _ExtentY        =   503
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Mandatory       =   -1  'True
               Label           =   "Country"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   1275
            End
            Begin ITGControls.ITGTextBox txtPhone2 
               Height          =   285
               Left            =   7635
               TabIndex        =   19
               Tag             =   "C"
               Top             =   780
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   20
               Label           =   "Phone 02"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   900
               TextBoxWidth    =   1845
            End
            Begin ITGControls.ITGTextBox txtEMail2 
               Height          =   285
               Left            =   7635
               TabIndex        =   23
               Tag             =   "C"
               Top             =   1980
               Width           =   2805
               _ExtentX        =   4736
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "E-Mail 02"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   900
               TextBoxWidth    =   1845
            End
            Begin ITGControls.ITGTextBox txtSAddress 
               Height          =   285
               Left            =   -74835
               TabIndex        =   29
               Tag             =   "S"
               Top             =   1575
               Width           =   7200
               _ExtentX        =   12488
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Address"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   5730
            End
            Begin ITGControls.ITGTextBox txtLastName 
               Height          =   285
               Left            =   -74835
               TabIndex        =   24
               Tag             =   "S"
               Top             =   675
               Width           =   3915
               _ExtentX        =   6694
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14745599
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Mandatory       =   -1  'True
               Label           =   "Full Name"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   2445
            End
            Begin ITGControls.ITGTextBox txtCompany 
               Height          =   285
               Left            =   -74835
               TabIndex        =   28
               Tag             =   "S"
               Top             =   1275
               Width           =   7200
               _ExtentX        =   12488
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Company"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   5730
            End
            Begin ITGControls.ITGTextBox txtSCity 
               Height          =   285
               Left            =   -74835
               TabIndex        =   30
               Tag             =   "S"
               Top             =   1875
               Width           =   4035
               _ExtentX        =   6906
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "City / Province"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   2565
            End
            Begin ITGControls.ITGTextBox txtSState 
               Height          =   285
               Left            =   -70815
               TabIndex        =   31
               Tag             =   "S"
               Top             =   1875
               Width           =   3180
               _ExtentX        =   5503
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Street"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   3120
            End
            Begin ITGControls.ITGTextBox txtSZip 
               Height          =   285
               Left            =   -68700
               TabIndex        =   33
               Tag             =   "S"
               Top             =   2175
               Width           =   1065
               _ExtentX        =   1773
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   10
               Label           =   "Street"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   1005
            End
            Begin VB.ComboBox cboSCountry 
               Height          =   315
               ItemData        =   "frmMaintCustomer.frx":03E2
               Left            =   -73395
               List            =   "frmMaintCustomer.frx":03E4
               Style           =   2  'Dropdown List
               TabIndex        =   32
               Top             =   2175
               Width           =   4680
            End
            Begin ITGControls.ITGCommandButton ITGcmdBrowsePicture 
               Height          =   315
               Left            =   -65415
               TabIndex        =   36
               TabStop         =   0   'False
               Top             =   1890
               Width           =   720
               _ExtentX        =   1270
               _ExtentY        =   556
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Caption         =   "Browse"
            End
            Begin ITGControls.ITGCommandButton ITGcmdClearPicture 
               Height          =   315
               Left            =   -66165
               TabIndex        =   35
               TabStop         =   0   'False
               Top             =   1890
               Width           =   720
               _ExtentX        =   1270
               _ExtentY        =   556
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Caption         =   "Clear"
            End
            Begin ITGControls.ITGCommandButton ITGcmdShowPicture 
               Height          =   315
               Left            =   -66915
               TabIndex        =   34
               TabStop         =   0   'False
               Top             =   1890
               Width           =   720
               _ExtentX        =   1270
               _ExtentY        =   556
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               Caption         =   "Preview"
            End
            Begin ITGControls.ITGCheckBox ITGchkAutoPicture 
               Height          =   300
               Left            =   -66915
               TabIndex        =   37
               TabStop         =   0   'False
               Top             =   2205
               Width           =   2295
               _ExtentX        =   4048
               _ExtentY        =   529
               BackColor       =   16243138
               ForeColor       =   8388608
               Caption         =   "Auto Preview Picture"
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
            End
            Begin ITGControls.ITGTextBox txtSCountry 
               Height          =   285
               Left            =   -70605
               TabIndex        =   43
               Tag             =   "cboCountry"
               Top             =   2190
               Visible         =   0   'False
               Width           =   1575
               _ExtentX        =   2672
               _ExtentY        =   503
               LabelBackColor  =   16777215
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Mandatory       =   -1  'True
               Label           =   "Country"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   1515
            End
            Begin ITGControls.ITGTextBox txtFirstName 
               Height          =   285
               Left            =   -70935
               TabIndex        =   25
               Tag             =   "S"
               Top             =   675
               Width           =   2505
               _ExtentX        =   4313
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               BackColor       =   14745599
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Mandatory       =   -1  'True
               Label           =   ""
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   2445
            End
            Begin ITGControls.ITGTextBox txtMI 
               Height          =   285
               Left            =   -68445
               TabIndex        =   26
               Tag             =   "S"
               Top             =   675
               Width           =   810
               _ExtentX        =   1323
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   ""
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   0
               TextBoxWidth    =   750
            End
            Begin ITGControls.ITGTextBox txtJobTitle 
               Height          =   285
               Left            =   -74835
               TabIndex        =   27
               Tag             =   "S"
               Top             =   975
               Width           =   7200
               _ExtentX        =   12488
               _ExtentY        =   503
               SendKeysTab     =   -1  'True
               LabelBackColor  =   16243138
               BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               MaxLength       =   50
               Label           =   "Job Title"
               BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
                  Name            =   "Tahoma"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   400
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               LabelWidth      =   1410
               TextBoxWidth    =   5730
            End
            Begin MSComDlg.CommonDialog cd 
               Left            =   -66900
               Top             =   405
               _ExtentX        =   847
               _ExtentY        =   847
               _Version        =   393216
            End
            Begin VB.Label Label5 
               BackStyle       =   0  'Transparent
               Caption         =   "M.I."
               ForeColor       =   &H000000C0&
               Height          =   255
               Left            =   -68400
               TabIndex        =   49
               Top             =   420
               Width           =   765
            End
            Begin VB.Label Label3 
               BackStyle       =   0  'Transparent
               Caption         =   "First Name"
               ForeColor       =   &H000000C0&
               Height          =   255
               Left            =   -70875
               TabIndex        =   48
               Top             =   420
               Width           =   1320
            End
            Begin VB.Label Label1 
               BackStyle       =   0  'Transparent
               Caption         =   "Last Name"
               ForeColor       =   &H000000C0&
               Height          =   255
               Left            =   -73365
               TabIndex        =   47
               Top             =   420
               Width           =   1320
            End
            Begin VB.Image imgEmployee 
               Appearance      =   0  'Flat
               BorderStyle     =   1  'Fixed Single
               Height          =   1530
               Left            =   -66915
               Stretch         =   -1  'True
               Top             =   345
               Width           =   2190
            End
            Begin VB.Label Label4 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Country / Zip"
               Height          =   195
               Left            =   -74805
               TabIndex        =   46
               Top             =   2220
               Width           =   1140
            End
            Begin VB.Label Label7 
               AutoSize        =   -1  'True
               BackStyle       =   0  'Transparent
               Caption         =   "Country / Zip"
               Height          =   195
               Left            =   225
               TabIndex        =   45
               Top             =   1080
               Width           =   1140
            End
         End
         Begin ITGControls.ITGTextBox txtCode 
            Height          =   285
            Left            =   120
            TabIndex        =   1
            Top             =   510
            Width           =   2880
            _ExtentX        =   4868
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14745599
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            MaxLength       =   25
            Mandatory       =   -1  'True
            Label           =   "Client ID"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1410
            TextBoxWidth    =   1410
            Required        =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtName 
            Height          =   285
            Left            =   120
            TabIndex        =   4
            Top             =   825
            Width           =   6600
            _ExtentX        =   11430
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Mandatory       =   -1  'True
            Label           =   "Client Name"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1410
            TextBoxWidth    =   5130
            Required        =   -1  'True
         End
         Begin ITGControls.ITGCheckBox chkSupplier 
            Height          =   300
            Left            =   7020
            TabIndex        =   5
            Top             =   825
            Width           =   1035
            _ExtentX        =   1826
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   "Individual"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin ITGControls.ITGCheckBox chkCustomer 
            Height          =   300
            Left            =   7020
            TabIndex        =   2
            Top             =   540
            Width           =   1035
            _ExtentX        =   1826
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   "Company"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin ITGControls.ITGTextBox txtType 
            Height          =   285
            Left            =   8160
            TabIndex        =   41
            Top             =   540
            Width           =   2415
            _ExtentX        =   4048
            _ExtentY        =   503
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Mandatory       =   -1  'True
            Label           =   "Type"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1200
            TextBoxWidth    =   1155
            Required        =   -1  'True
         End
         Begin VB.Label lblHold 
            Alignment       =   2  'Center
            BackColor       =   &H00000000&
            Caption         =   "CUSTOMER ON HOLD"
            BeginProperty Font 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C0FFFF&
            Height          =   240
            Left            =   3045
            TabIndex        =   50
            Top             =   540
            Visible         =   0   'False
            Width           =   3660
         End
      End
      Begin CRVIEWERLibCtl.CRViewer ITGReportViewer 
         Height          =   7080
         Left            =   -74985
         TabIndex        =   39
         Top             =   360
         Visible         =   0   'False
         Width           =   11070
         DisplayGroupTree=   0   'False
         DisplayToolbar  =   -1  'True
         EnableGroupTree =   0   'False
         EnableNavigationControls=   -1  'True
         EnableStopButton=   -1  'True
         EnablePrintButton=   -1  'True
         EnableZoomControl=   -1  'True
         EnableCloseButton=   -1  'True
         EnableProgressControl=   -1  'True
         EnableSearchControl=   -1  'True
         EnableRefreshButton=   0   'False
         EnableDrillDown =   -1  'True
         EnableAnimationControl=   -1  'True
         EnableSelectExpertButton=   0   'False
         EnableToolbar   =   -1  'True
         DisplayBorder   =   0   'False
         DisplayTabs     =   0   'False
         DisplayBackgroundEdge=   -1  'True
         SelectionFormula=   ""
         EnablePopupMenu =   -1  'True
         EnableExportButton=   -1  'True
         EnableSearchExpertButton=   0   'False
         EnableHelpButton=   0   'False
      End
   End
   Begin ITGControls.ITGTab SSTab1 
      Height          =   3090
      Left            =   15
      TabIndex        =   54
      Top             =   5145
      Width           =   11040
      _ExtentX        =   19473
      _ExtentY        =   5450
      TabCount        =   5
      TabCaption(0)   =   "Basic"
      TabContCtrlCnt(0)=   29
      Tab(0)ContCtrlCap(1)=   "cboEwtType"
      Tab(0)ContCtrlCap(2)=   "cboTaxType"
      Tab(0)ContCtrlCap(3)=   "cboTerms"
      Tab(0)ContCtrlCap(4)=   "cboIntTerms"
      Tab(0)ContCtrlCap(5)=   "txtIntTerms"
      Tab(0)ContCtrlCap(6)=   "txtTerms"
      Tab(0)ContCtrlCap(7)=   "txtTaxType"
      Tab(0)ContCtrlCap(8)=   "txtEWTType"
      Tab(0)ContCtrlCap(9)=   "chkEWT"
      Tab(0)ContCtrlCap(10)=   "txtDepartment"
      Tab(0)ContCtrlCap(11)=   "txtTIN"
      Tab(0)ContCtrlCap(12)=   "txtPDDesc"
      Tab(0)ContCtrlCap(13)=   "txtMSDesc"
      Tab(0)ContCtrlCap(14)=   "txtBalance"
      Tab(0)ContCtrlCap(15)=   "txtPayment"
      Tab(0)ContCtrlCap(16)=   "txtReturns"
      Tab(0)ContCtrlCap(17)=   "txtCredit"
      Tab(0)ContCtrlCap(18)=   "txtDebit"
      Tab(0)ContCtrlCap(19)=   "txtSales"
      Tab(0)ContCtrlCap(20)=   "txtPDCode"
      Tab(0)ContCtrlCap(21)=   "txtMSCode"
      Tab(0)ContCtrlCap(22)=   "txtSMCode"
      Tab(0)ContCtrlCap(23)=   "txtSMName"
      Tab(0)ContCtrlCap(24)=   "chkHold"
      Tab(0)ContCtrlCap(25)=   "cmdPickDept"
      Tab(0)ContCtrlCap(26)=   "cmdPickPD"
      Tab(0)ContCtrlCap(27)=   "cmdPickMS"
      Tab(0)ContCtrlCap(28)=   "cmdPickSM"
      Tab(0)ContCtrlCap(29)=   "txtEWTRate"
      TabCaption(1)   =   "Credit Line"
      TabContCtrlCnt(1)=   4
      Tab(1)ContCtrlCap(1)=   "Frame5"
      Tab(1)ContCtrlCap(2)=   "Frame4"
      Tab(1)ContCtrlCap(3)=   "chkGroupLimit"
      Tab(1)ContCtrlCap(4)=   "txtCL"
      TabCaption(2)   =   "Member"
      TabContCtrlCnt(2)=   2
      Tab(2)ContCtrlCap(1)=   "cmdList"
      Tab(2)ContCtrlCap(2)=   "lvwList"
      TabCaption(3)   =   "History"
      TabContCtrlCnt(3)=   4
      Tab(3)ContCtrlCap(1)=   "Frame2"
      Tab(3)ContCtrlCap(2)=   "cmdHistory"
      Tab(3)ContCtrlCap(3)=   "dtgHistory"
      Tab(3)ContCtrlCap(4)=   "cmdPrintHistory"
      TabCaption(4)   =   "Address"
      TabContCtrlCnt(4)=   4
      Tab(4)ContCtrlCap(1)=   "dtgAddress"
      Tab(4)ContCtrlCap(2)=   "txtNote"
      Tab(4)ContCtrlCap(3)=   "cboCountryDetails"
      Tab(4)ContCtrlCap(4)=   "Label8"
      TabTheme        =   2
      ActiveTabBackEndColor=   16243138
      InActiveTabBackStartColor=   16243138
      InActiveTabBackEndColor=   16243138
      BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      OuterBorderColor=   4210752
      TopLeftInnerBorderColor=   4210752
      BottomRightInnerBorderColor=   4210752
      DisabledTabBackColor=   16243138
      DisabledTabForeColor=   -2147483630
      Begin VB.ComboBox cboEwtType 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Height          =   315
         ItemData        =   "frmMaintCustomer.frx":03E6
         Left            =   5940
         List            =   "frmMaintCustomer.frx":0405
         Style           =   2  'Dropdown List
         TabIndex        =   56
         Top             =   2310
         Width           =   1410
      End
      Begin VB.ComboBox cboTaxType 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Height          =   315
         ItemData        =   "frmMaintCustomer.frx":044C
         Left            =   5925
         List            =   "frmMaintCustomer.frx":046B
         Style           =   2  'Dropdown List
         TabIndex        =   101
         Top             =   1965
         Width           =   1410
      End
      Begin VB.ComboBox cboTerms 
         Height          =   315
         Left            =   1665
         Style           =   2  'Dropdown List
         TabIndex        =   99
         Top             =   1665
         Width           =   1320
      End
      Begin VB.ComboBox cboIntTerms 
         Height          =   315
         Left            =   1665
         Style           =   2  'Dropdown List
         TabIndex        =   100
         Top             =   1335
         Width           =   1320
      End
      Begin ITGControls.ITGTextBox txtIntTerms 
         Height          =   285
         Left            =   180
         TabIndex        =   104
         Top             =   1335
         Width           =   2295
         _ExtentX        =   3836
         _ExtentY        =   503
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         MaxLength       =   15
         Mandatory       =   -1  'True
         Label           =   "Internal Terms"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1450
         TextBoxWidth    =   785
      End
      Begin ITGControls.ITGTextBox txtTerms 
         Height          =   285
         Left            =   180
         TabIndex        =   103
         Top             =   1665
         Width           =   2310
         _ExtentX        =   3863
         _ExtentY        =   503
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         MaxLength       =   15
         Mandatory       =   -1  'True
         Label           =   "Customer Terms"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1450
         TextBoxWidth    =   800
      End
      Begin ITGControls.ITGTextBox txtTaxType 
         Height          =   285
         Left            =   4080
         TabIndex        =   102
         Top             =   1950
         Width           =   3135
         _ExtentX        =   5318
         _ExtentY        =   503
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "Tax Type"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1800
         TextBoxWidth    =   1275
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtEWTType 
         Height          =   285
         Left            =   5925
         TabIndex        =   98
         Tag             =   "cboType"
         Top             =   2310
         Visible         =   0   'False
         Width           =   1185
         _ExtentX        =   1984
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "Transaction Type"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   1125
      End
      Begin ITGControls.ITGCheckBox chkEWT 
         Height          =   300
         Left            =   4095
         TabIndex        =   97
         Tag             =   "C"
         Top             =   2325
         Width           =   1740
         _ExtentX        =   3069
         _ExtentY        =   529
         BackColor       =   16243138
         Caption         =   "Auto-compute EWT"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         SendKeysTab     =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtDepartment 
         Height          =   285
         Left            =   4050
         TabIndex        =   96
         Tag             =   "C"
         Top             =   1335
         Width           =   2940
         _ExtentX        =   4974
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         MaxLength       =   10
         Label           =   "Department"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1020
         TextBoxWidth    =   1860
      End
      Begin ITGControls.ITGTextBox txtTIN 
         Height          =   285
         Left            =   4050
         TabIndex        =   95
         Tag             =   "C"
         Top             =   1650
         Width           =   3285
         _ExtentX        =   5583
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         MaxLength       =   15
         Label           =   "TIN"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1020
         TextBoxWidth    =   2205
      End
      Begin ITGControls.ITGTextBox txtPDDesc 
         Height          =   285
         Left            =   3360
         TabIndex        =   94
         Top             =   1020
         Width           =   3990
         _ExtentX        =   6932
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Locked          =   -1  'True
         Label           =   "ITGtext"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3930
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtMSDesc 
         Height          =   285
         Left            =   3360
         TabIndex        =   93
         Top             =   705
         Width           =   3990
         _ExtentX        =   6932
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Locked          =   -1  'True
         Label           =   "ITGtext"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3930
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtBalance 
         Height          =   285
         Left            =   7560
         TabIndex        =   92
         Tag             =   "C"
         Top             =   1965
         Width           =   2520
         _ExtentX        =   4233
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Balance"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   900
         TextBoxWidth    =   1560
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtPayment 
         Height          =   285
         Left            =   7560
         TabIndex        =   91
         Tag             =   "C"
         Top             =   1650
         Width           =   2520
         _ExtentX        =   4233
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Payment"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   900
         TextBoxWidth    =   1560
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtReturns 
         Height          =   285
         Left            =   7560
         TabIndex        =   90
         Tag             =   "C"
         Top             =   1335
         Width           =   2520
         _ExtentX        =   4233
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Returns"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   900
         TextBoxWidth    =   1560
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtCredit 
         Height          =   285
         Left            =   7560
         TabIndex        =   89
         Tag             =   "C"
         Top             =   1020
         Width           =   2520
         _ExtentX        =   4233
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Credit"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   900
         TextBoxWidth    =   1560
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtDebit 
         Height          =   285
         Left            =   7560
         TabIndex        =   88
         Tag             =   "C"
         Top             =   705
         Width           =   2520
         _ExtentX        =   4233
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Debit"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   900
         TextBoxWidth    =   1560
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtSales 
         Height          =   285
         Left            =   7560
         TabIndex        =   87
         Tag             =   "C"
         Top             =   390
         Width           =   2520
         _ExtentX        =   4233
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Sales"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   900
         TextBoxWidth    =   1560
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtPDCode 
         Height          =   285
         Left            =   180
         TabIndex        =   86
         Tag             =   "C"
         Top             =   1020
         Width           =   2805
         _ExtentX        =   4736
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         MaxLength       =   8
         Mandatory       =   -1  'True
         Label           =   "Product Division"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1460
         TextBoxWidth    =   1285
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtMSCode 
         Height          =   285
         Left            =   180
         TabIndex        =   85
         Tag             =   "C"
         Top             =   705
         Width           =   2805
         _ExtentX        =   4736
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         MaxLength       =   8
         Mandatory       =   -1  'True
         Label           =   "Market Segment"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1460
         TextBoxWidth    =   1285
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtSMCode 
         Height          =   285
         Left            =   180
         TabIndex        =   84
         Tag             =   "C"
         Top             =   390
         Width           =   2805
         _ExtentX        =   4736
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         MaxLength       =   8
         Mandatory       =   -1  'True
         Label           =   "Salesman"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1460
         TextBoxWidth    =   1285
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtSMName 
         Height          =   285
         Left            =   3360
         TabIndex        =   83
         Top             =   390
         Width           =   3990
         _ExtentX        =   6932
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Locked          =   -1  'True
         Label           =   "ITGtext"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3930
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGCheckBox chkHold 
         Height          =   300
         Left            =   210
         TabIndex        =   82
         Tag             =   "C"
         Top             =   1980
         Width           =   2715
         _ExtentX        =   4789
         _ExtentY        =   529
         BackColor       =   16243138
         Caption         =   "Hold Customer's Transactions"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         SendKeysTab     =   -1  'True
      End
      Begin VB.CommandButton cmdPickDept 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   7020
         Picture         =   "frmMaintCustomer.frx":04B2
         Style           =   1  'Graphical
         TabIndex        =   81
         Top             =   1335
         Width           =   315
      End
      Begin VB.CommandButton cmdPickPD 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   3030
         Picture         =   "frmMaintCustomer.frx":05FC
         Style           =   1  'Graphical
         TabIndex        =   80
         Top             =   1020
         Width           =   315
      End
      Begin VB.CommandButton cmdPickMS 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   3030
         Picture         =   "frmMaintCustomer.frx":0746
         Style           =   1  'Graphical
         TabIndex        =   79
         Top             =   705
         Width           =   315
      End
      Begin VB.CommandButton cmdPickSM 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   3030
         Picture         =   "frmMaintCustomer.frx":0890
         Style           =   1  'Graphical
         TabIndex        =   78
         Top             =   390
         Width           =   315
      End
      Begin VB.Frame Frame5 
         Appearance      =   0  'Flat
         BackColor       =   &H00F7D9C2&
         Caption         =   " Credit Limit per Market Segment "
         ForeColor       =   &H80000008&
         Height          =   1875
         Left            =   -74760
         TabIndex        =   75
         Top             =   750
         Width           =   4755
         Begin VB.ComboBox cboMS 
            Height          =   315
            Left            =   60
            Style           =   2  'Dropdown List
            TabIndex        =   76
            Top             =   1500
            Visible         =   0   'False
            Width           =   1395
         End
         Begin MSDataGridLib.DataGrid dtgMSLimit 
            Height          =   1650
            Left            =   0
            TabIndex        =   77
            Top             =   225
            Width           =   4755
            _ExtentX        =   8387
            _ExtentY        =   2910
            _Version        =   393216
            AllowUpdate     =   -1  'True
            AllowArrows     =   -1  'True
            Appearance      =   0
            HeadLines       =   1
            RowHeight       =   15
            TabAction       =   2
            FormatLocked    =   -1  'True
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   5
            BeginProperty Column00 
               DataField       =   "cCode"
               Caption         =   "Customer Code"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   1
                  Format          =   "#,##0.00"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   1
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   "cType"
               Caption         =   "Credit Limit Type"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column02 
               DataField       =   "cDescription"
               Caption         =   "Market Segment"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column03 
               DataField       =   "cClassCode"
               Caption         =   "MSCode"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column04 
               DataField       =   "nLimit"
               Caption         =   "Credit Limit"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   1
                  Format          =   "#,##0.00"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   1
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
                  Object.Visible         =   0   'False
               EndProperty
               BeginProperty Column01 
                  Object.Visible         =   0   'False
               EndProperty
               BeginProperty Column02 
                  Button          =   -1  'True
                  Locked          =   -1  'True
                  ColumnWidth     =   1620.284
               EndProperty
               BeginProperty Column03 
                  Locked          =   -1  'True
                  ColumnWidth     =   764.787
               EndProperty
               BeginProperty Column04 
                  Alignment       =   1
                  ColumnWidth     =   1800
               EndProperty
            EndProperty
         End
      End
      Begin VB.Frame Frame4 
         Appearance      =   0  'Flat
         BackColor       =   &H00F7D9C2&
         Caption         =   " Credit Limit per Product Division "
         ForeColor       =   &H80000008&
         Height          =   1875
         Left            =   -69660
         TabIndex        =   72
         Top             =   750
         Width           =   4815
         Begin VB.ComboBox cboPD 
            Height          =   315
            Left            =   120
            Style           =   2  'Dropdown List
            TabIndex        =   73
            Top             =   1440
            Visible         =   0   'False
            Width           =   1395
         End
         Begin MSDataGridLib.DataGrid dtgPDLimit 
            Height          =   1650
            Left            =   0
            TabIndex        =   74
            Top             =   225
            Width           =   4815
            _ExtentX        =   8493
            _ExtentY        =   2910
            _Version        =   393216
            AllowUpdate     =   -1  'True
            Appearance      =   0
            HeadLines       =   1
            RowHeight       =   15
            FormatLocked    =   -1  'True
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   5
            BeginProperty Column00 
               DataField       =   "cCode"
               Caption         =   "Customer Code"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   1
                  Format          =   "#,##0.00"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   1
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   "cType"
               Caption         =   "Credit Limit Type"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column02 
               DataField       =   "cDescription"
               Caption         =   "Product Division"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column03 
               DataField       =   "cClassCode"
               Caption         =   "PDCode"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column04 
               DataField       =   "nLimit"
               Caption         =   "Credit Limit"
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   1
                  Format          =   "#,##0.00"
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   1033
                  SubFormatType   =   1
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
                  Object.Visible         =   0   'False
               EndProperty
               BeginProperty Column01 
                  Object.Visible         =   0   'False
               EndProperty
               BeginProperty Column02 
                  Button          =   -1  'True
                  Locked          =   -1  'True
                  ColumnWidth     =   1620.284
               EndProperty
               BeginProperty Column03 
                  Locked          =   -1  'True
                  ColumnWidth     =   764.787
               EndProperty
               BeginProperty Column04 
                  Alignment       =   1
                  ColumnWidth     =   1874.835
               EndProperty
            EndProperty
         End
      End
      Begin ITGControls.ITGCheckBox chkGroupLimit 
         Height          =   300
         Left            =   -74760
         TabIndex        =   71
         Tag             =   "C"
         Top             =   390
         Width           =   3255
         _ExtentX        =   5741
         _ExtentY        =   529
         BackColor       =   16243138
         Caption         =   "Affect Parent Company Credit limit"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         SendKeysTab     =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtCL 
         Height          =   285
         Left            =   -69135
         TabIndex        =   70
         Tag             =   "C"
         Top             =   450
         Width           =   4290
         _ExtentX        =   7355
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "0"
         DataType        =   1
         MaximumValue    =   9999999999.99
         DecimalPlace    =   2
         Label           =   "Total Credit Limit (Market Segment)"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   2700
         TextBoxWidth    =   1530
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGCommandButton cmdList 
         Height          =   315
         Left            =   -65280
         TabIndex        =   69
         Top             =   2400
         Width           =   1260
         _ExtentX        =   2223
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "Show List"
      End
      Begin MSComctlLib.ListView lvwList 
         Height          =   2025
         Left            =   -75000
         TabIndex        =   68
         Top             =   315
         Width           =   11085
         _ExtentX        =   19553
         _ExtentY        =   3572
         View            =   3
         LabelWrap       =   -1  'True
         HideSelection   =   -1  'True
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         HotTracking     =   -1  'True
         _Version        =   393217
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   0
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Customer ID"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Customer Name"
            Object.Width           =   7937
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "Address"
            Object.Width           =   4322
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Phone No."
            Object.Width           =   2540
         EndProperty
      End
      Begin VB.Frame Frame2 
         Appearance      =   0  'Flat
         BackColor       =   &H00F7D9C2&
         Caption         =   "Date Range"
         ForeColor       =   &H80000008&
         Height          =   1260
         Left            =   -74940
         TabIndex        =   63
         Top             =   330
         Width           =   2115
         Begin ITGControls.ITGDateBox dtbTo 
            Height          =   285
            Left            =   690
            TabIndex        =   64
            Top             =   720
            Width           =   1305
            _ExtentX        =   2302
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbFrom 
            Height          =   285
            Left            =   690
            TabIndex        =   65
            Top             =   330
            Width           =   1305
            _ExtentX        =   2302
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGLabel ITGLabel4 
            Height          =   285
            Left            =   180
            TabIndex        =   66
            Top             =   300
            Width           =   375
            _ExtentX        =   661
            _ExtentY        =   503
            Caption         =   "From"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin ITGControls.ITGLabel ITGLabel5 
            Height          =   285
            Left            =   180
            TabIndex        =   67
            Top             =   720
            Width           =   375
            _ExtentX        =   661
            _ExtentY        =   503
            Caption         =   "To"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
      End
      Begin ITGControls.ITGCommandButton cmdHistory 
         Height          =   315
         Left            =   -74940
         TabIndex        =   62
         Top             =   1635
         Width           =   2115
         _ExtentX        =   3731
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "Show History"
      End
      Begin MSDataGridLib.DataGrid dtgHistory 
         Height          =   2625
         Left            =   -72735
         TabIndex        =   61
         Top             =   315
         Width           =   8820
         _ExtentX        =   15558
         _ExtentY        =   4630
         _Version        =   393216
         AllowUpdate     =   -1  'True
         Appearance      =   0
         Enabled         =   -1  'True
         HeadLines       =   1
         RowHeight       =   15
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   6
         BeginProperty Column00 
            DataField       =   "dDate"
            Caption         =   "Date"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   3
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "cInvNo"
            Caption         =   "Invoice No."
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "nSales"
            Caption         =   "Gross"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "#,##0.00"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   1
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "nPaid"
            Caption         =   "Payment"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "#,##0.00"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   1
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "nCMDMReturn"
            Caption         =   "CM/DM/Returns"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "#,##0.00"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   1
            EndProperty
         EndProperty
         BeginProperty Column05 
            DataField       =   "nBalance"
            Caption         =   "Balance"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "#,##0.00"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   1
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
               ColumnWidth     =   1244.976
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   1349.858
            EndProperty
            BeginProperty Column02 
               Alignment       =   1
            EndProperty
            BeginProperty Column03 
               Alignment       =   1
            EndProperty
            BeginProperty Column04 
               Alignment       =   1
            EndProperty
            BeginProperty Column05 
               Alignment       =   1
               ColumnWidth     =   1604.976
            EndProperty
         EndProperty
      End
      Begin ITGControls.ITGCommandButton cmdPrintHistory 
         Height          =   315
         Left            =   -74940
         TabIndex        =   60
         Top             =   1980
         Width           =   2115
         _ExtentX        =   3731
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "Print History"
      End
      Begin MSDataGridLib.DataGrid dtgAddress 
         Height          =   1305
         Left            =   -75000
         TabIndex        =   59
         Top             =   360
         Width           =   11085
         _ExtentX        =   19553
         _ExtentY        =   2302
         _Version        =   393216
         AllowArrows     =   -1  'True
         HeadLines       =   1
         RowHeight       =   15
         TabAcrossSplits =   -1  'True
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   8
         BeginProperty Column00 
            DataField       =   "cAddress"
            Caption         =   "Address"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "cCity"
            Caption         =   "City"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cState"
            Caption         =   "State"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "cCountry"
            Caption         =   "Country"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "cZip"
            Caption         =   "Zip"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column05 
            DataField       =   "cContact"
            Caption         =   "Contact"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column06 
            DataField       =   "cTel"
            Caption         =   "Phone"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column07 
            DataField       =   "cFax"
            Caption         =   "Fax"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
               ColumnWidth     =   3344.882
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   1230.236
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   1154.835
            EndProperty
            BeginProperty Column03 
               Button          =   -1  'True
               Locked          =   -1  'True
               ColumnWidth     =   1620.284
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   569.764
            EndProperty
            BeginProperty Column05 
            EndProperty
            BeginProperty Column06 
            EndProperty
            BeginProperty Column07 
               ColumnWidth     =   1275.024
            EndProperty
         EndProperty
      End
      Begin RichTextLib.RichTextBox txtNote 
         Height          =   1380
         Left            =   -73665
         TabIndex        =   58
         Tag             =   "C"
         Top             =   1680
         Width           =   9435
         _ExtentX        =   16642
         _ExtentY        =   2434
         _Version        =   393217
         ScrollBars      =   3
         MaxLength       =   1000
         Appearance      =   0
         TextRTF         =   $"frmMaintCustomer.frx":09DA
      End
      Begin VB.ComboBox cboCountryDetails 
         Height          =   315
         Left            =   -74880
         Style           =   2  'Dropdown List
         TabIndex        =   57
         Top             =   1200
         Visible         =   0   'False
         Width           =   2730
      End
      Begin ITGControls.ITGTextBox txtEWTRate 
         Height          =   285
         Left            =   4080
         TabIndex        =   55
         Top             =   2640
         Width           =   3255
         _ExtentX        =   5530
         _ExtentY        =   503
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "EWT Rate"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1800
         TextBoxWidth    =   1395
         Required        =   -1  'True
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Customer Notes"
         Height          =   195
         Left            =   -74865
         TabIndex        =   105
         Top             =   1665
         Width           =   1155
      End
   End
   Begin VB.Label lblDetails 
      BackColor       =   &H00F7D9C2&
      Caption         =   "Client Type"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   255
      TabIndex        =   51
      Top             =   600
      Visible         =   0   'False
      Width           =   9270
   End
   Begin VB.Label lblHeader 
      BackColor       =   &H00F7D9C2&
      Caption         =   "Client ID - Client Name"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   255
      TabIndex        =   52
      Top             =   240
      Width           =   8955
   End
   Begin VB.Shape Shape1 
      BorderColor     =   &H00404040&
      Height          =   975
      Left            =   15
      Top             =   0
      Width           =   9795
   End
   Begin VB.Image imgLogo 
      BorderStyle     =   1  'Fixed Single
      Height          =   930
      Left            =   9840
      Stretch         =   -1  'True
      Top             =   45
      Width           =   1125
   End
End
Attribute VB_Name = "frmMaintCustomer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'Object variables

Private oPrint As New clsPrinting

'Recordset variables
Private WithEvents rsHeader As ADODB.Recordset
Attribute rsHeader.VB_VarHelpID = -1
Private rsMS As ADODB.Recordset
Private rsPD As ADODB.Recordset
Private rsAddress As ADODB.Recordset
Private rsBudget As ADODB.Recordset

Private rsHistory As Recordset

'ADO Connection variables

Private connHeader As ADODB.Connection
Private connMS As ADODB.Connection
Private connPD As ADODB.Connection
Private connAddress As ADODB.Connection
Private connBudget As ADODB.Connection

'Form mode enumeration
Public Enum eCustMode
    Normal
    AddNewEdit
    Find
End Enum
Public Mode As eCustMode

'Other declaration
Public dtgName As String
Public sBit As String
Private vBM As Variant 'Recordset bookmark variable
Private TempPath As String
Private nInterval As Integer

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean

'Combo to TextBox
Private Sub cboCountry_Click()
    txtCountry = Trim(cboCountry)
End Sub

Private Sub cboCountry_KeyPress(KeyAscii As Integer)
    SendKeysTab KeyAscii
End Sub

Private Sub cboCountryDetails_Click()
    dtgAddress.Columns(3) = cboCountryDetails
End Sub

Private Sub cboCountryDetails_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
        dtgAddress.Columns(3) = cboCountryDetails
        cboCountryDetails.Visible = False
        dtgAddress.Col = 4
        dtgAddress.Columns(4) = ""
        dtgAddress.SetFocus
    ElseIf KeyCode = vbKeyEscape Then
        cboCountryDetails.Visible = False
        dtgAddress.Col = 3
        dtgAddress.SetFocus
    End If
End Sub

Private Sub cboCountryDetails_LostFocus()
    cboCountryDetails.Visible = False
End Sub

Private Sub cboSCountry_Click()
    txtSCountry = Trim(cboSCountry)
End Sub

Private Sub cboSCountry_KeyPress(KeyAscii As Integer)
    SendKeysTab KeyAscii
End Sub

Private Sub cboType_Change()
If Mode <> AddNewEdit Then: Exit Sub
txtType = Trim(cboType)
End Sub

Private Sub cboType_Click()
If Mode <> AddNewEdit Then: Exit Sub
txtType = Trim(cboType)
End Sub

Private Sub chkEWT_Click()
On Error Resume Next
    If chkEWT.Value = Checked Then
        cboEwtType.Enabled = True
    Else
        cboEwtType.Enabled = False
        cboEwtType.Text = ""
    End If

End Sub

Private Sub chkHold_Click()
On Error Resume Next
    If Mode <> AddNewEdit Then Exit Sub
    If chkHold.Value = Checked Then
        lblHold.Visible = True
    Else: lblHold.Visible = False
    End If
End Sub

Private Sub cmdPickProv_Click()
    If lPickListActive Then Exit Sub
    sFilterString = Trim(txtState)
    frmITGPicker.zType = QLocationProv
    
    frmITGPicker.Show vbModal
    txtState = frmITGPicker.zName
    SendKeys "{Tab}"
End Sub


Private Sub dtgBudget_Error(ByVal DataError As Integer, Response As Integer)
    Response = 0
End Sub


Private Sub ITGTextBox6_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
End Sub

Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
   SortGrid dtgList, ColIndex, rsHeader
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Dim iKey As Integer
    iKey = ToolbarIndex(KeyCode, Shift)
    If iKey <> 0 Then
        If ITGLedgerMain.tbrMain.Buttons(iKey).Enabled = True Then
            ToolbarFunction iKey
        End If
    End If
End Sub

Private Sub txtArea_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
End Sub

Private Sub txtCity_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
End Sub

Private Sub txtFirstName_KeyPress(KeyAscii As Integer)
    If chkSupplier.Value = Checked Then
        txtName.Text = Trim(txtLastName.Text) + ", " + Trim(txtFirstName.Text) + Chr(KeyAscii) + " " + Trim(txtMI.Text)
    End If
End Sub

Private Sub txtFreight_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
End Sub

Private Sub txtLastName_KeyPress(KeyAscii As Integer)
    If chkSupplier.Value = Checked Then
        txtName.Text = Trim(txtLastName.Text) + Chr(KeyAscii) + ", " + Trim(txtFirstName.Text) + " " + Trim(txtMI.Text)
    End If
End Sub

Private Sub txtMI_KeyPress(KeyAscii As Integer)
    If chkSupplier.Value = Checked Then
        txtName.Text = Trim(txtLastName.Text) + ", " + Trim(txtFirstName.Text) + " " + Trim(txtMI.Text) + Chr(KeyAscii)
    End If
End Sub

Private Sub txtPMCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
End Sub

Private Sub txtSCountry_Change()
    If Trim(txtSCountry) <> "" Or txtSCountry <> vbNullString Then
        cboSCountry = Trim(txtSCountry)
    Else: cboSCountry.ListIndex = -1
    End If
End Sub

Private Sub cboIntTerms_Click()
    txtIntTerms = Trim(cboIntTerms)
End Sub

Private Sub cboIntTerms_KeyPress(KeyAscii As Integer)
    SendKeysTab KeyAscii
End Sub

Private Sub cboMS_Click()
    rsMS!cClassCode = GetValueFrTable("cClassCode", "CLASSIFICATION", "cDescription = '" & Trim(cboMS) & "' AND cType = 'MS'")
    dtgMSLimit.Columns(2) = cboMS
End Sub

Private Sub cboPD_Click()
    rsPD!cClassCode = GetValueFrTable("cClassCode", "CLASSIFICATION", "cDescription = '" & Trim(cboPD) & "' AND cType = 'PD'")
    dtgPDLimit.Columns(2) = cboPD
End Sub

Private Sub cboMS_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
        rsMS!cClassCode = GetValueFrTable("cClassCode", "CLASSIFICATION", "cDescription = '" & Trim(cboMS) & "' AND cType = 'MS'")
        dtgMSLimit.Columns(2) = cboMS
        cboMS.Visible = False
        dtgMSLimit.Col = 4
        dtgMSLimit.Columns(4) = 0
        dtgMSLimit.SetFocus
    ElseIf KeyCode = vbKeyEscape Then
        cboMS.Visible = False
        dtgMSLimit.Col = 2
        dtgMSLimit.SetFocus
    End If
End Sub

Private Sub cboMS_LostFocus()
    cboMS.Visible = False
End Sub

Private Sub cboPD_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
        rsPD!cClassCode = GetValueFrTable("cClassCode", "CLASSIFICATION", "cDescription = '" & Trim(cboPD) & "' AND cType = 'PD'")
        dtgPDLimit.Columns(2) = cboPD
        cboPD.Visible = False
        dtgPDLimit.Col = 4
        dtgPDLimit.Columns(4) = 0
        dtgPDLimit.SetFocus
    ElseIf KeyCode = vbKeyEscape Then
        cboPD.Visible = False
        dtgPDLimit.Col = 2
        dtgPDLimit.SetFocus
    End If
End Sub

Private Sub cboPD_LostFocus()
    cboPD.Visible = False
End Sub

Private Sub cboTerms_Click()
    txtTerms = Trim(cboTerms)
End Sub

Private Sub cboTerms_KeyPress(KeyAscii As Integer)
    SendKeysTab KeyAscii
End Sub

Private Sub cboEwtType_Click()
    txtEWTType = Trim(cboEwtType)
    txtEWTRate = GetValueFrTable("cValue", "PARAMETER_USER", "cParamName = '" & Trim(cboEwtType) & "' and cCompanyID = '" & Trim(COID) & "' and cType = 'ATCCode'")

End Sub

Private Sub cboTaxType_Click()
    txtTaxType = Trim(cboTaxType)
End Sub

Private Sub chkCustomer_Click()
On Error Resume Next
    If Mode <> AddNewEdit Then Exit Sub
    If chkCustomer.Value = Checked Then
    End If
End Sub

Private Sub chkSupplier_Click()
On Error Resume Next
    If Mode <> AddNewEdit Then Exit Sub
    If chkSupplier.Value = Checked Then
    End If
End Sub

Private Sub cmdHistory_Click()
    If Not IsDate(dtbFrom.Text) Then
        MsgBox "Please input date parameter.", vbInformation, "ComUnion"
        dtbFrom.SetFocus
        Exit Sub
    ElseIf Not IsDate(dtbTo.Text) Then
        MsgBox "Please input date parameter.", vbInformation, "ComUnion"
        dtbTo.SetFocus
        Exit Sub
    End If
    Set rsHistory = Nothing
    Set rsHistory = New Recordset
    Set dtgHistory.DataSource = Nothing
    dtgHistory.Refresh
    sSQL = "SELECT * FROM V_History_Customer WHERE cCode = '" & Trim(txtCode) & "' " & _
            "AND dDate BETWEEN '" & Trim(dtbFrom.Text) & "' AND '" & Trim(dtbTo.Text) & "'"
    rsHistory.Open sSQL, cn, adOpenForwardOnly, adLockReadOnly
    Set dtgHistory.DataSource = rsHistory
End Sub

Private Sub cmdList_Click()
    If rsHeader!cCode = "" Then Exit Sub
    sSQL = "SELECT cCode, cName, cAddress, cTel1 FROM CLIENT_CUSTOMER " & _
            "WHERE cGroupCode = '" & Trim(rsHeader!cCode) & "' AND cCompanyID = '" & COID & "'"
    Set rs = New Recordset
    rs.Open sSQL, cn, adOpenForwardOnly, adLockReadOnly
    lvwList.ListItems.Clear
    Do Until rs.EOF
        Set itmX = lvwList.ListItems.Add(, , Trim(rs!cCode))
        itmX.SubItems(1) = rs!cName
        itmX.SubItems(2) = rs!cAddress & ""
        itmX.SubItems(3) = rs!cTel1 & ""
        rs.MoveNext
    Loop
    rs.Close
    Set rs = Nothing
End Sub

'Call pick list module

Private Sub cmdPickCode_Click()
    If lPickListActive Then Exit Sub
    sFilterString = Trim(txtGroupCode)
    frmITGPicker.zType = QCustomer
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'" 'added gino
    frmITGPicker.Show vbModal
    txtGroupCode = frmITGPicker.zCode
    txtGroupName = frmITGPicker.zName
    If Trim(txtGroupName) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub cmdPickDept_Click()
    If lPickListActive Then Exit Sub
    frmITGPicker.zType = QSecDepartment
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'" 'added gino
    frmITGPicker.Show vbModal
    txtDepartment = frmITGPicker.zCode
    If Trim(txtDepartment) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub cmdPickMS_Click()
    If lPickListActive Then Exit Sub
    frmITGPicker.zType = QMarketSegment
    'added condition
    frmITGPicker.Condition = "AND cCompanyID = '" & COID & "'"
    
    frmITGPicker.Show vbModal
    txtMSCode = frmITGPicker.zCode
    txtMSDesc = frmITGPicker.zName
    If Trim(txtMSDesc) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub cmdPickPD_Click()
    If lPickListActive Then Exit Sub
    frmITGPicker.zType = QProductDivision
    'added condition
    frmITGPicker.Condition = "AND cCompanyID = '" & COID & "'"
    
    frmITGPicker.Show vbModal
    txtPDCode = frmITGPicker.zCode
    txtPDDesc = frmITGPicker.zName
    If Trim(txtPDDesc) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub cmdPickSM_Click()
    If lPickListActive Then Exit Sub
    sFilterString = Trim(txtSMCode)
    frmITGPicker.zType = QSalesman
    'added condition
    frmITGPicker.Condition = "where cCompanyID = '" & COID & "'"
    
    frmITGPicker.Show vbModal
    txtSMCode = frmITGPicker.zCode
    txtSMName = frmITGPicker.zName
    If Trim(txtSMName) <> "" Then SendKeys "{Tab}"
End Sub

Private Sub dtgAddress_ButtonClick(ByVal ColIndex As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    Select Case ColIndex
        Case 3
            MoveCombo cboCountryDetails, dtgAddress, dtgAddress.Columns(3)
            ComboLoadValue cboCountryDetails, Trim(dtgAddress.Columns(3).Text)
            cboCountryDetails.SetFocus
    End Select
End Sub

'Set the datagrid as active control
Private Sub dtgAddress_Click()
    If Mode = AddNewEdit Then dtgName = dtgAddress.Name
End Sub

Private Sub dtgAddress_Error(ByVal DataError As Integer, Response As Integer)
    Response = 0
End Sub

Private Sub dtgAddress_GotFocus()
    dtgName = dtgAddress.Name
End Sub

Private Sub dtgAddress_KeyDown(KeyCode As Integer, Shift As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If (Shift = vbCtrlMask And KeyCode = 45) Then
        TBNewLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
        TBDeleteLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
        TBSave
    End If
End Sub

Private Sub dtgAddress_KeyPress(KeyAscii As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If rsAddress.RecordCount = 0 Then Exit Sub
    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
    If KeyAscii = 13 Then
        Select Case dtgAddress.Col
            Case 3
                If Not cboCountryDetails.Visible Then dtgAddress_ButtonClick 3
            Case 7
                TBNewLine
                dtgAddress.LeftCol = 0
            Case Else
                SendKeys "{Tab}"
        End Select
    Else: KeyAscii = Asc(UCase(Chr(KeyAscii)))       'All Upper Case String
    End If
End Sub

'Right click menu popup
Private Sub dtgAddress_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Mode <> AddNewEdit Then Exit Sub
    If Button = 2 Then
        dtgName = dtgAddress.Name
        PopupMenu ITGLedgerMain.mnuDetail
    End If
End Sub

Private Sub dtgBudget_KeyDown(KeyCode As Integer, Shift As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If (Shift = vbCtrlMask And KeyCode = 45) Then
        TBNewLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
        TBDeleteLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
        TBSave
    End If
End Sub

Private Sub dtgHistory_HeadClick(ByVal ColIndex As Integer)
On Error Resume Next
    SortGrid dtgHistory, ColIndex, rsHistory
End Sub

Private Sub dtgHistory_KeyDown(KeyCode As Integer, Shift As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If (Shift = vbCtrlMask And KeyCode = 45) Then
        TBNewLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
        TBDeleteLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
        TBSave
    End If
End Sub

'Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
'    SortGrid dtgList, ColIndex, rsHeader
'End Sub

Private Sub dtgMSLimit_AfterColUpdate(ByVal ColIndex As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    Select Case ColIndex
        Case 4
            ComputeTotalMSLimit
    End Select
End Sub

Private Sub dtgMSLimit_ButtonClick(ByVal ColIndex As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    Select Case ColIndex
        Case 2
            Call LoadComboValues(cboMS, "cDescription", "CLASSIFICATION", "WHERE cType = 'MS' AND cCompanyID = '" & Trim(COID) & "'")
            MoveCombo cboMS, dtgMSLimit, dtgMSLimit.Columns(2)
            ComboLoadValue cboMS, Trim(dtgMSLimit.Columns(2))
            cboMS.SetFocus
    End Select
End Sub

'Set the datagrid as active control
Private Sub dtgMSLimit_Click()
    If Mode = AddNewEdit Then dtgName = dtgMSLimit.Name
End Sub

Private Sub dtgMSLimit_Error(ByVal DataError As Integer, Response As Integer)
    Response = 0
End Sub

Private Sub dtgMSLimit_GotFocus()
    dtgName = dtgMSLimit.Name
End Sub

Private Sub dtgMSLimit_KeyDown(KeyCode As Integer, Shift As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If (Shift = vbCtrlMask And KeyCode = 45) Then
        TBNewLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
        TBDeleteLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
        TBSave
    End If
End Sub

Private Sub dtgMSLimit_KeyPress(KeyAscii As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If rsMS.RecordCount = 0 Then Exit Sub
    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
    If KeyAscii = 13 Then
        Select Case dtgMSLimit.Col
            Case 2
                If Not cboMS.Visible Then dtgMSLimit_ButtonClick 2
            Case 4
                ComputeTotalMSLimit
                TBNewLine
                dtgMSLimit.LeftCol = 2
        End Select
    End If
End Sub

'Right click menu popup
Private Sub dtgMSLimit_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Mode <> AddNewEdit Then Exit Sub
    If Button = 2 Then
        dtgName = dtgMSLimit.Name
        PopupMenu ITGLedgerMain.mnuDetail
    End If
End Sub

Private Sub dtgPDLimit_ButtonClick(ByVal ColIndex As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    Select Case ColIndex
        Case 2
            Call LoadComboValues(cboPD, "cDescription", "CLASSIFICATION", "WHERE cType = 'PD' AND cCompanyID = '" & Trim(COID) & "'")
            MoveCombo cboPD, dtgPDLimit, dtgPDLimit.Columns(2)
            ComboLoadValue cboPD, Trim(dtgPDLimit.Columns(2).Text)
            cboPD.SetFocus
    End Select
End Sub

'Set the datagrid as active control
Private Sub dtgPDLimit_Click()
    If Mode = AddNewEdit Then dtgName = dtgPDLimit.Name
End Sub

Private Sub dtgPDLimit_Error(ByVal DataError As Integer, Response As Integer)
    Response = 0
End Sub

Private Sub dtgPDLimit_GotFocus()
    dtgName = dtgPDLimit.Name
End Sub

Private Sub dtgPDLimit_KeyDown(KeyCode As Integer, Shift As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If (Shift = vbCtrlMask And KeyCode = 45) Then
        TBNewLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
        TBDeleteLine
    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
        TBSave
    End If
End Sub

Private Sub dtgPDLimit_KeyPress(KeyAscii As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If rsPD.RecordCount = 0 Then Exit Sub
    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
    If KeyAscii = 13 Then
        Select Case dtgPDLimit.Col
            Case 2
                If Not cboPD.Visible Then dtgPDLimit_ButtonClick 2
            Case 4
                TBNewLine
                dtgPDLimit.LeftCol = 2
        End Select
    End If
End Sub

'Right click menu popup
Private Sub dtgPDLimit_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Mode <> AddNewEdit Then Exit Sub
    If Button = 2 Then
        dtgName = dtgPDLimit.Name
        PopupMenu ITGLedgerMain.mnuDetail
    End If
End Sub

'Set Your Object
Private Sub Form_Load()
        
    Set FrmName = Me
    FormSetup

    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'MF04'")

    Set rsHeader = New ADODB.Recordset
    Set rsMS = New ADODB.Recordset
    Set rsPD = New ADODB.Recordset
    Set rsAddress = New ADODB.Recordset
    Set rsBudget = New ADODB.Recordset
    

    'CallComboBox Values
    Call LoadComboValues(cboType, "cParamname", "PARAMETER_SYSTEM", "where ctype = 'CUSTTYPE'")
    Call LoadComboValues(cboTerms, "cParamName", "PARAMETER_USER", "WHERE cType = 'TERMS' AND cCompanyID = '" & Trim(COID) & "'", "nOrder")
    Call LoadComboValues(cboIntTerms, "cParamName", "PARAMETER_USER", "WHERE cType = 'TERMS' AND cCompanyID = '" & Trim(COID) & "'", "nOrder")
    Call LoadComboValues(cboCountry, "cValue", "PARAMETER_SYSTEM", "WHERE cType = 'COUNTRY'")
    Call LoadComboValues(cboSCountry, "cValue", "PARAMETER_SYSTEM", "WHERE cType = 'COUNTRY'")
    Call LoadComboValues(cboCountryDetails, "cValue", "PARAMETER_SYSTEM", "WHERE cType = 'COUNTRY'")
    Call LoadComboValues(cboTaxType, "cValue", "Parameter_user", "where ctype = 'TAXTYPE'")
    Call LoadComboValues(cboEwtType, "cParamname", "Parameter_user", "where ctype = 'ATCCODE'")
    
    FormLocking True
    FormSearch True
    SearchObj True
    ITGchkAutoPicture.Enabled = True
    ITGcmdShowPicture.Enabled = True
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
    BitVisible ITGLedgerMain.tbrMain, True
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True

    imgLogo.Picture = ITGLedgerMain.Picture1.Picture
    Mode = Find
    txtCode.Locked = False
    txtEWTRate.Locked = True
    
    SetVisibleEnable
    
End Sub

'Activate your Toolbar Mode
Private Sub Form_Activate()
    TBBitReload
End Sub

'Release your Object
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
    If Mode = AddNewEdit Then
        MsgBox "Unable to close. You are in Add/New/Edit mode." & vbCr & _
            " Must Save or Undo", vbCritical, Me.Caption
        Cancel = True
        Exit Sub
    End If

    CloseMenuTab ITGLedgerMain
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = False
    
    Set rsHeader = Nothing
    Set rsMS = Nothing
    Set rsPD = Nothing
    Set rsAddress = Nothing
    Set rsBudget = Nothing
    Set rsHistory = Nothing
    Set connHeader = Nothing
    Set connMS = Nothing
    Set connPD = Nothing
    Set connAddress = Nothing
    Set connBudget = Nothing

    Set frmMaintCustomer = Nothing

    lCloseWindow = True
    
'    'oForm(Me.Tag).Mode = 1
'    'oForm(Me.Tag).Tag = Me.Tag
End Sub

'Add new record to the recordset
Public Sub TBNew()

    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
    txtCode.BackColor = &HE0FFFF
    Mode = AddNewEdit

    If rsHeader.State <> adStateOpen Then
        OpenNewConnection connHeader
        OpenNewConnection connMS
        OpenNewConnection connPD
        OpenNewConnection connAddress
        OpenNewConnection connBudget
        OpenRecordsetWithCN rsAddress, "*", "CLIENT_CUSTOMER_ADD", connAddress, "WHERE 1 = 0"
        OpenRecordsetWithCN rsBudget, "*", "CLIENT_CUSTOMER_BUD", connBudget, "WHERE 1 = 0"
        OpenRecordsetWithCN rsMS, "*", "CLIENT_CUSTOMER_CL", connMS, "WHERE 1 = 0"
        OpenRecordsetWithCN rsPD, "*", "CLIENT_CUSTOMER_CL", connPD, "WHERE 1 = 0"
        OpenRecordsetWithCN rsHeader, "*", "CLIENT_CUSTOMER", connHeader, "WHERE 1 = 0"
        SetDataSource
        SetDataField
    Else
        vBM = rsHeader.Bookmark
    End If

    rsHeader.AddNew
    rsHeader!cCompanyID = COID
    rsHeader!lCompany = False
    rsHeader!lIndividual = False
    rsHeader!lHold = False
'    rsHeader!cCustomerType = "Regular"   ' Code for asian shipping but we can use to other company
'    rsHeader!cMSCode = "DEFAULT"  ' Code for asian shipping but we can use to other company
'    rsHeader!cPDCode = "DEFAULT"  ' Code for asian shipping but we can use to other company
'    rsHeader!cCountry = "PHILIPPINES"

    rsHeader!cCustomerType = GetValueFrTable("cValue", "system_option", "cCode = 'DEF_CUSTTYPE'")
    rsHeader!cMSCode = GetValueFrTable("cValue", "system_option", "cCode = 'DEF_MSSCODE'")
    rsHeader!cPDCode = GetValueFrTable("cValue", "system_option", "cCode = 'DEF_PDCODE'")
    rsHeader!cCountry = GetValueFrTable("cValue", "system_option", "cCode = 'DEF_COUNTRY'")

    Set FrmName = Me
    FormLocking False
    ClrRequired &HC0&
    cmdHistory.Enabled = False
    cmdList.Enabled = False
    chkEWT.Value = Unchecked
    cboEwtType.Enabled = False
    txtEWTRate.Locked = True
    lblHold.Visible = False
    SSTab1.ActiveTab = 0
    SSTab2.ActiveTab = 0
    SSTab3.ActiveTab = 0
    txtCode.SetFocus
    
End Sub

'Undo all changes to the recordset
Public Sub TBUndoAll()
On Error GoTo ErrorHandler

    Mode = Normal

    If rsHeader.Status = adRecNew Then TBUndoCurrent

    rsHeader.CancelBatch adAffectAll
    rsMS.CancelBatch adAffectAll
    rsPD.CancelBatch adAffectAll
    rsAddress.CancelBatch adAffectAll
    rsBudget.CancelBatch adAffectAll

    UnbindControls

    If rsHeader.RecordCount <> 0 Then rsHeader.Bookmark = vBM

    Set FrmName = Me
    FormLocking True
    ITGchkAutoPicture.Enabled = True
    ITGcmdShowPicture.Enabled = True
    cmdHistory.Visible = True
    cmdList.Enabled = True

    If rsHeader.RecordCount <> 0 Then
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    Else
        RSZero
        Mode = Find
    End If

    sbRS.Panels(2) = ""

    SetDataSource
    SetDataField

ErrorHandler:
    cboCountryDetails.Visible = False
    cboMS.Visible = False
    cboPD.Visible = False
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoAll
    End If
End Sub

'Undo changes on the current record
Public Sub TBUndoCurrent()
On Error GoTo ErrorHandler

    GetChild
    If rsHeader.Status = adRecNew Then
        rsMS.CancelBatch adAffectAll
        rsPD.CancelBatch adAffectAll
        rsAddress.CancelBatch adAffectAll
        rsBudget.CancelBatch adAffectAll
        rsHeader.CancelUpdate
    Else
        rsHeader.CancelBatch adAffectCurrent
        rsMS.CancelBatch adAffectAll
        rsPD.CancelBatch adAffectAll
        rsAddress.CancelBatch adAffectAll
        rsBudget.CancelBatch adAffectAll
    End If

    If rsHeader.RecordCount = 0 Then RSZero

    cboMS.Visible = False
    cboPD.Visible = False

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoCurrent
    End If
End Sub

'Save all changes
Public Sub TBSave()
Dim OKUpdate As Boolean
'On Error GoTo ErrHandler

    'Audit Trail
    lBoolean = False
    If rsHeader.Status = adRecNew Then lBoolean = True

    If Not MandatoryOK Then Exit Sub
    
    
   
    OKUpdate = False
    cn.BeginTrans
    connHeader.BeginTrans
    connMS.BeginTrans
    connPD.BeginTrans
    connAddress.BeginTrans
    connBudget.BeginTrans

    rsHeader.UpdateBatch adAffectAll
    rsMS.UpdateBatch adAffectAll
    rsPD.UpdateBatch adAffectAll
    rsAddress.UpdateBatch adAffectAll
    rsBudget.UpdateBatch adAffectAll

    cn.CommitTrans
    connHeader.CommitTrans
    connMS.CommitTrans
    connPD.CommitTrans
    connAddress.CommitTrans
    connBudget.CommitTrans
    OKUpdate = True
    
    Call ClientToWHSE
    
    Set FrmName = Me
    FormLocking True
    ITGchkAutoPicture.Enabled = True
    ITGcmdShowPicture.Enabled = True
    cmdHistory.Enabled = True
    dtbFrom.Enabled = True
    dtbTo.Enabled = True
    cmdList.Enabled = True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    Mode = Normal
    

    MsgBox "Record/s successfully saved.", vbInformation, "ComUnion"

    'Update Parent Company field of the referenced parent company
    If txtGroupCode <> "" Then
        cn.Execute "UPDATE CLIENT_CUSTOMER SET cGroupCode = '" & Trim(txtGroupCode) & "', lGroupLimit = 1 WHERE cCode = '" & Trim(txtGroupCode) & "' AND cCompanyID = '" & COID & "'"
    End If
    
    If lBoolean = False Then ' Edit
        cn.Execute "UPDATE CLIENT_CUSTOMER SET dUpdated = GETDATE () WHERE cCode = '" & Trim(txtCode) & "' AND cCompanyID = '" & COID & "'"
    Else ' Insert
        cn.Execute "UPDATE CLIENT_CUSTOMER SET dUpdated = GETDATE () WHERE cCode = '" & Trim(txtCode) & "' AND cCompanyID = '" & COID & "'"
    End If
    'Audit trail
    UpdateLogFile "Customer", Trim(txtCode), IIf(lBoolean, "Inserted", "Updated")

    lblHeader = rsHeader!cCode & " - " & rsHeader!cName & ""
    'lblDetails = rsHeader!cAddress & ""
    sbRS.Panels(2) = ""
ErrHandler:
    cboCountryDetails.Visible = False
    cboMS.Visible = False
    cboPD.Visible = False
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217864 Then
        OKUpdate = True
        cn.RollbackTrans
        connHeader.RollbackTrans
        connMS.RollbackTrans
        connPD.RollbackTrans
        connAddress.RollbackTrans
        connBudget.RollbackTrans
        MsgBox "Record cannot be updated. Some values may have been changed by other user/s since last read." & vbCr & _
                "Records will be automatically refreshed. All changes made to the record will be gone upon refresh.", vbInformation, "ComUnion"
        vBookMark = rsHeader.Bookmark
        UnbindControls
        rsHeader.Requery
        rsMS.Requery
        rsPD.Requery
        rsAddress.Requery
        rsBudget.Requery
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
        Mode = Normal
        If rsHeader.RecordCount <> 0 Then
            Set FrmName = Me
            FormLocking True
            ITGchkAutoPicture.Enabled = True
            ITGcmdShowPicture.Enabled = True
            cmdHistory.Enabled = True
            dtbFrom.Enabled = True
            dtbTo.Enabled = True
            cmdList.Enabled = True
            SetDataField
            SetDataSource
            rsHeader.Bookmark = vBookMark
        Else
            RSZero
        End If
    End If

    If Not OKUpdate Then
        MsgBox "Transaction update failed.", vbInformation, "ComUnion"
        cn.RollbackTrans
        connHeader.RollbackTrans
        connMS.RollbackTrans
        connPD.RollbackTrans
        connAddress.RollbackTrans
        connBudget.RollbackTrans
        ErrorLog err.Number, err.Description, Me.Name 'Error log
    End If

End Sub

'Sets the form & recorset to add/edit mode
Public Sub TBEdit()
    Mode = AddNewEdit
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
    Set FrmName = Me
    FormLocking False
    ClrRequired &HC0&
    cmdHistory.Enabled = False
    cmdList.Enabled = False
    txtCode.Locked = True
    SSTab2.ActiveTab = 0
    txtName.SetFocus
    vBM = rsHeader.Bookmark
End Sub

'Delete record
Public Sub TBDelete()
Dim Code As String
On Error GoTo ErrorHandler

    sID = Trim(txtCode)

    If rsHeader.RecordCount = 0 Then Exit Sub

   Dim rs As New ADODB.Recordset
   Set rs = Nothing
    rs.Open "SELECT cCode FROM VClient WHERE cCode = '" & Trim(txtCode) & "' AND cCompanyID = '" & COID & "'", cn, adOpenStatic

    If rs.RecordCount <> 0 Then
        MsgBox "Unable to delete. Referenced by other transactions.", vbExclamation, "ALERT"
        rs.Close
        GoTo ErrorHandler
    End If

    If MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub

    Code = Trim(rsHeader!cCode)

    GetChild
    If rsMS.RecordCount <> 0 Then
        rsMS.MoveFirst
        Do Until rsMS.RecordCount = 0
            rsMS.Delete adAffectCurrent
            If rsMS.RecordCount <> 0 Then rsMS.MoveFirst
        Loop
    End If
    If rsPD.RecordCount <> 0 Then
        rsPD.MoveFirst
        Do Until rsPD.RecordCount = 0
            rsPD.Delete adAffectCurrent
            If rsPD.RecordCount <> 0 Then rsPD.MoveFirst
        Loop
    End If
    If rsAddress.RecordCount <> 0 Then
        rsAddress.MoveFirst
        Do Until rsAddress.RecordCount = 0
            rsAddress.Delete adAffectCurrent
            If rsAddress.RecordCount <> 0 Then rsAddress.MoveFirst
        Loop
    End If
    If rsBudget.RecordCount <> 0 Then
        rsBudget.MoveFirst
        Do Until rsBudget.RecordCount = 0
            rsBudget.Delete adAffectCurrent
            If rsBudget.RecordCount <> 0 Then rsBudget.MoveFirst
        Loop
    End If

    'Audit trail
    UpdateLogFile "Customer", Trim(txtCode), "Deleted"

    rsHeader.Delete adAffectCurrent

    rsMS.UpdateBatch adAffectAll
    rsPD.UpdateBatch adAffectAll
    rsAddress.UpdateBatch adAffectAll
    rsBudget.UpdateBatch adAffectAll
    rsHeader.UpdateBatch adAffectAll
    


    TBPrevRec

    Mode = Normal

    If rsHeader.RecordCount = 0 Then
        RSZero
    End If

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217864 Then
        cn.Execute "DELETE CLIENT_CUSTOMER_CL WHERE cCode = '" & sID & "' AND cCompanyID = '" & COID & "'"
        cn.Execute "DELETE CLIENT_CUSTOMER_ADD WHERE cCode = '" & sID & "' AND cCompanyID = '" & COID & "'"
        cn.Execute "DELETE CLIENT_CUSTOMER WHERE cCode = '" & sID & "' AND cCompanyID = '" & COID & "'"
'        cn.Execute "DELETE CLIENT WHERE cCode = '" & sID & "' AND cCompanyID = '" & COID & "'"
        Resume Next
    End If

End Sub

'Search using the frmITGSearch
Public Sub TBFind()
    Mode = Normal
    txtCode.Locked = True
    frmITGSearch.Show
End Sub

'Search using the recordset primary key
Public Sub TBFindPrimary()
Dim sTemp As String
If Mode = Find Then
    FormWaitShow App.Path & "\Transmit.avi", "Loading data . . ."
            
    OpenNewConnection connHeader
    OpenNewConnection connMS
    OpenNewConnection connPD
    OpenNewConnection connAddress
    OpenNewConnection connBudget

    Set rsHeader = Nothing
    Set rsMS = Nothing
    Set rsPD = Nothing
    Set rsAddress = Nothing
    Set rsBudget = Nothing
    Set rsHeader = New ADODB.Recordset
    Set rsMS = New ADODB.Recordset
    Set rsPD = New ADODB.Recordset
    Set rsAddress = New ADODB.Recordset
    Set rsBudget = New ADODB.Recordset


    sTemp = Trim$(GetSearchString)
    If sTemp = "ERROR" Then
        MsgBox "Only Allows A - Z, 0 - 9, '.', ',' and %(wildcard)", vbExclamation, ""
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
        txtCode.Locked = False
        txtCode.SetFocus
        Exit Sub
    End If
                
    OpenRecordsetWithCN rsHeader, "*", "CLIENT_CUSTOMER", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
    'OpenRecordsetWithCN rsMS, "*", "CLIENT_CUSTOMER_CL", connMS, "WHERE cType = 'MS'"
    'OpenRecordsetWithCN rsPD, "*", "CLIENT_CUSTOMER_CL", connPD, "WHERE cType = 'PD'"
    'OpenRecordsetWithCN rsAddress, "*", "CLIENT_CUSTOMER_ADD", connAddress
    'OpenRecordsetWithCN rsBudget, "*", "CLIENT_CUSTOMER_BUD", connBudget
                
    OpenRecordsetWithCN rsMS, "*", "CLIENT_CUSTOMER_CL", connMS, IIf(sTemp = "", "WHERE cType = 'MS'", " WHERE cType = 'MS' AND cCode IN (SELECT cCode FROM CLIENT_CUSTOMER WHERE " & sTemp & ")")
    OpenRecordsetWithCN rsPD, "*", "CLIENT_CUSTOMER_CL", connPD, IIf(sTemp = "", "WHERE cType = 'PD'", " WHERE cType = 'PD' AND cCode IN (SELECT cCode FROM CLIENT_CUSTOMER WHERE " & sTemp & ")")
    OpenRecordsetWithCN rsAddress, "*", "CLIENT_CUSTOMER_ADD", connAddress, IIf(sTemp = "", "", " WHERE cCode IN (SELECT cCode FROM CLIENT_CUSTOMER WHERE " & sTemp & ")")
    OpenRecordsetWithCN rsBudget, "*", "CLIENT_CUSTOMER_BUD", connBudget, IIf(sTemp = "", "", " WHERE cCode IN (SELECT cCode FROM CLIENT_CUSTOMER WHERE " & sTemp & ")")

    
    Set FrmName = Me
    FormLocking True
    ITGchkAutoPicture.Enabled = True
    ITGcmdShowPicture.Enabled = True
    cmdHistory.Enabled = True
    dtbFrom.Enabled = True
    dtbTo.Enabled = True
    cmdList.Enabled = True

    If rsHeader.RecordCount = 0 Then
        FormWaitHide
        MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
        RSZero
        FormSearch True
        SearchObj True
        Mode = Find
        Exit Sub
    End If

    SetDataSource
    SetDataField
    txtCode.BackColor = &HE0FFFF
    Mode = Normal
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True
    
 
    
    FormWaitHide
Else
    RSZero
    FormSearch True
    SearchObj True
    Mode = Find
 
    
End If

End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitVisible ITGLedgerMain.tbrMain, True
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
    Set FrmName = Me
    dtgName = dtgMSLimit.Name
End Sub

'Close active window
Public Sub TBCloseWindow()
    Unload Me
End Sub

'Move first
Public Sub TBFirstRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveFirst rsHeader

End Sub

'Move previous
Public Sub TBPrevRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MovePrevious rsHeader

End Sub

'Move next
Public Sub TBNextRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveNext rsHeader


End Sub

'Move last
Public Sub TBLastRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveLast rsHeader

End Sub

'Add new line to the detail recordset
Public Sub TBNewLine()

    If rsHeader!cCode = "" Then Exit Sub

    If dtgName = "dtgMSLimit" Then
        rsMS.AddNew
        rsMS!cCompanyID = COID
        rsMS!cCode = Trim(txtCode)
        rsMS!cType = "MS"
        GetChild
        dtgMSLimit.SetFocus
        dtgMSLimit.Col = 2
        rsMS.MoveLast
    ElseIf dtgName = "dtgPDLimit" Then
        rsPD.AddNew
        rsPD!cCompanyID = COID
        rsPD!cCode = Trim(txtCode)
        rsPD!cType = "PD"
        GetChild
        dtgPDLimit.SetFocus
        dtgPDLimit.Col = 2
        rsPD.MoveLast
    ElseIf dtgName = "dtgAddress" Then
        rsAddress.AddNew
        rsAddress!cCompanyID = COID
        rsAddress!cCode = Trim(txtCode)
        GetChild
        dtgAddress.SetFocus
        dtgAddress.Col = 0
        rsAddress.MoveLast
    End If

End Sub

'Delete line in the detail recordset
Public Sub TBDeleteLine()
On Error GoTo ErrorHandler

    If dtgName = "dtgMSLimit" Then
        If rsMS.RecordCount = 0 Then Exit Sub
        vBookMark = dtgMSLimit.Bookmark
        GetChild
        dtgMSLimit.Bookmark = vBookMark
        rsMS.Delete adAffectCurrent
        ComputeTotalMSLimit
    ElseIf dtgName = "dtgPDLimit" Then
        If rsPD.RecordCount = 0 Then Exit Sub
        vBookMark = dtgPDLimit.Bookmark
        GetChild
        dtgPDLimit.Bookmark = vBookMark
        rsPD.Delete adAffectCurrent
    ElseIf dtgName = "dtgAddress" Then
        If rsAddress.RecordCount = 0 Then Exit Sub
        vBookMark = dtgAddress.Bookmark
        GetChild
        dtgAddress.Bookmark = vBookMark
        rsAddress.Delete adAffectCurrent
    End If
    GetChild

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If

End Sub

'Undo all
Public Sub TBUndoLineAll()
On Error GoTo ErrorHandler

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If

End Sub

'Undo current line
Public Sub TBUndoLineCurrent()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Post current record
Public Sub TBPostRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Cancel current record
Public Sub TBCancelRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Print
Public Sub TBPrintRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Sets the data source of the controls
Sub SetDataSource()

    Set dtgMSLimit.DataSource = rsMS
    Set dtgPDLimit.DataSource = rsPD
    Set dtgAddress.DataSource = rsAddress
    Set dtgList.DataSource = rsHeader

    Set txtName.DataSource = rsHeader
    Set txtCode.DataSource = rsHeader
    Set chkCustomer.DataSource = rsHeader
    Set chkSupplier.DataSource = rsHeader
    Set chkEWT.DataSource = rsHeader
    Set txtType.DataSource = rsHeader

    Set txtAddress.DataSource = rsHeader
    Set txtSAddress.DataSource = rsHeader
    Set txtCity.DataSource = rsHeader
    Set txtSCity.DataSource = rsHeader
    Set txtState.DataSource = rsHeader
    Set txtSState.DataSource = rsHeader
    Set txtZip.DataSource = rsHeader
    Set txtSZip.DataSource = rsHeader
    Set txtContact.DataSource = rsHeader
    Set txtDescription.DataSource = rsHeader
    Set txtGroupCode.DataSource = rsHeader
    Set txtPhone1.DataSource = rsHeader
    Set txtPhone2.DataSource = rsHeader
    Set txtFax.DataSource = rsHeader
    Set txtInternet.DataSource = rsHeader
    Set txtEMail1.DataSource = rsHeader
    Set txtEMail2.DataSource = rsHeader
    Set txtCompany.DataSource = rsHeader
    Set txtJobTitle.DataSource = rsHeader
    Set txtFirstName.DataSource = rsHeader
    Set txtLastName.DataSource = rsHeader
    Set txtMI.DataSource = rsHeader
    Set txtSMCode.DataSource = rsHeader
    Set txtMSCode.DataSource = rsHeader
    Set txtPDCode.DataSource = rsHeader
    Set txtCL.DataSource = rsHeader
    Set txtCountry.DataSource = rsHeader
    Set txtSCountry.DataSource = rsHeader
    Set txtIntTerms.DataSource = rsHeader
    Set txtTerms.DataSource = rsHeader
    Set txtTIN.DataSource = rsHeader
    Set txtDepartment.DataSource = rsHeader
    Set txtNote.DataSource = rsHeader
    Set txtTaxType.DataSource = rsHeader
    Set txtEWTType.DataSource = rsHeader
    Set txtEWTRate.DataSource = rsHeader

End Sub

'Sets the data field for every bounded controls
Sub SetDataField()
    With rsHeader
        txtCode.DataField = !cCode
        txtName.DataField = !cName
        chkCustomer.DataField = !lCompany
        chkSupplier.DataField = !lIndividual
        txtType.DataField = !cCustomerType
        
        txtAddress.DataField = !cAddress
        txtSAddress.DataField = !cAddress
        txtCity.DataField = !cCity
        txtSCity.DataField = !cCity
        txtState.DataField = !cState
        txtSState.DataField = !cState
        txtZip.DataField = !cZip
        txtSZip.DataField = !cZip
        txtContact.DataField = !cContact
        txtDescription.DataField = !cDescription
        txtGroupCode.DataField = !cGroupCode
        txtPhone1.DataField = !cTel1
        txtPhone2.DataField = !cTel2
        txtFax.DataField = !cFax
        txtInternet.DataField = !cInternet
        txtEMail1.DataField = !cEMail1
        txtEMail2.DataField = !cEMail2
        txtCompany.DataField = !cName
        txtJobTitle.DataField = !cJobTitle
        txtFirstName.DataField = !cFirstName
        txtLastName.DataField = !cLastName
        txtMI.DataField = !cMI
        
        txtSMCode.DataField = !cSMan
        txtMSCode.DataField = !cMSCode
        txtPDCode.DataField = !cPDCode
        txtCL.DataField = !nLimit
        txtCountry.DataField = !cCountry
        txtSCountry.DataField = !cCountry
        txtIntTerms.DataField = !cIntTerm
        txtTerms.DataField = !cTerm
        txtTIN.DataField = !cTIN
        txtDepartment.DataField = !cDepartment
        txtNote.DataField = "cNote"
        chkEWT.DataField = !lEWT
               
        chkHold.DataField = !lHold
        txtTaxType.DataField = !cTaxType
        txtEWTType.DataField = !cEwtType
        txtEWTRate.DataField = !nEWTRATE
        
        'txtVenCode.DataField = !cVenCode
    End With
End Sub

Private Sub lvwList_DblClick()
    If lvwList.ListItems.Count = 0 Then Exit Sub
    Set rs = New Recordset
    Set rs = rsHeader.Clone
    rs.Find "cCode = '" & Trim(lvwList.SelectedItem.Text) & "'"
    rsHeader.Bookmark = rs.Bookmark
    Set rs = Nothing
End Sub

Private Sub rsHeader_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
On Error GoTo ErrorHandler

    If Not (rsHeader.EOF) Or Not (rsHeader.BOF) Then
        lblHeader = rsHeader!cCode & " - " & rsHeader!cName & ""
        sbRS.Panels(1) = "Record: " & IIf((rsHeader.AbsolutePosition = -2), "0", rsHeader.AbsolutePosition) & "/" & rsHeader.RecordCount

        If rsHeader.Status <> adRecNew Then
            txtCode.Locked = True
        Else: txtCode.Locked = False
        End If

        If Mode = AddNewEdit Then
            Select Case rsHeader.Status
                Case adRecNew
                    sbRS.Panels(2) = "New"
                Case adRecModified
                    sbRS.Panels(2) = "Modified"
                Case Else
                    sbRS.Panels(2) = ""
            End Select
        Else: sbRS.Panels(2) = ""
        End If

        If rsHeader!lCompany = False Then
            If rsHeader!lIndividual = True Then
                SSTab3.ActiveTab = 1
            Else: SSTab3.ActiveTab = 0
            End If
        Else: SSTab3.ActiveTab = 0
        End If

        GetChild
        
        ShowCustomerBalance

        If rsHeader!lHold = True Then
            lblHold.Visible = True
            chkHold.Value = Checked
        Else
            lblHold.Visible = False
            chkHold.Value = Unchecked
        End If

    Else
        lblHeader = "Customer ID - Customer Name"
        sbRS.Panels(1) = "Record: 0/0"
        sbRS.Panels(2) = ""
        txtCode.Locked = False
    End If

    If Mode = AddNewEdit Then
        dtgMSLimit.Refresh
        dtgPDLimit.Refresh
        dtgAddress.Refresh
    End If

    lvwList.ListItems.Clear

    Set dtgHistory.DataSource = Nothing
    dtgHistory.Refresh
    dtbFrom.Text = "__/__/____"
    dtbTo.Text = "__/__/____"

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub

Private Sub Timer1_Timer()
    If Mode = AddNewEdit Then
        SSTab2.TabEnabled(1) = False
    Else: SSTab2.TabEnabled(1) = True
    End If
End Sub

Private Sub txtCountry_Change()
    If Trim(txtCountry) <> "" Or txtCountry <> vbNullString Then
        cboCountry = Trim(txtCountry)
    Else: cboCountry.ListIndex = -1
    End If
End Sub

Private Sub txtGroupCode_Change()
    txtGroupName = ""
    txtGroupName = GetValueFrTable("cName", "CLIENT_CUSTOMER", "cCode = '" & Trim(txtGroupCode) & "'")
End Sub

Private Sub txtGroupCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtGroupName) = "" And Trim(txtGroupCode) <> "" Then cmdPickCode_Click
End Sub

Private Sub txtIntTerms_Change()
    If Trim(txtIntTerms) <> "" Or txtIntTerms <> vbNullString Then
        cboIntTerms = Trim(txtIntTerms)
    Else: cboIntTerms.ListIndex = -1
    End If
End Sub

Private Sub txtState_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
End Sub

Private Sub txtType_Change()
    If Trim(txtType) <> "" Or txtType <> vbNullString Then
        cboType = Trim(txtType)
    Else: cboType.ListIndex = -1
    End If
End Sub

Private Sub txtEWTType_Change()
    If Trim(txtEWTType) <> "" Or txtEWTType <> vbNullString Then
        cboEwtType = Trim(txtEWTType)
    Else: cboEwtType.ListIndex = -1
    End If
    txtEWTRate.Text = GetValueFrTable("cValue", "parameter_user", "cParamName = '" & Trim(txtEWTType) & "'")
End Sub

Private Sub txtTaxType_Change()
    If Trim(txtTaxType) <> "" Or txtTaxType <> vbNullString Then
        cboTaxType = Trim(txtTaxType)
    Else: cboTaxType.ListIndex = -1
    End If
End Sub

Private Sub txtMSCode_Change()
    txtMSDesc = ""
    txtMSDesc = GetValueFrTable("cDescription", "CLASSIFICATION", "cClassCode = '" & Trim(txtMSCode) & "' AND cType = 'MS'")
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtMSDesc) = "" Then Exit Sub
    If rsMS.RecordCount < 1 Then
        rsMS.AddNew
        rsMS!cCompanyID = COID
        rsMS!cCode = Trim(txtCode)
        rsMS!cType = "MS"
        rsMS!cDescription = Trim(txtMSDesc)
        rsMS!cClassCode = Trim(txtMSCode)
        rsMS!nLimit = 0
        GetChild
    End If
End Sub

Private Sub txtMSCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtMSDesc) = "" And Trim(txtMSCode) <> "" Then cmdPickMS_Click
End Sub

Private Sub txtNote_KeyPress(KeyAscii As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

Private Sub txtPDCode_Change()
    txtPDDesc = ""
    txtPDDesc = GetValueFrTable("cDescription", "CLASSIFICATION", "cClassCode = '" & Trim(txtPDCode) & "' AND cType = 'PD'")
End Sub

Private Sub txtPDCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtPDDesc) = "" And Trim(txtPDCode) <> "" Then cmdPickPD_Click
End Sub

Private Sub txtSMCode_Change()
    txtSMName = ""
    txtSMName = GetValueFrTable("cName", "SALESMAN", "cCode = '" & Trim(txtSMCode) & "'")
End Sub

Private Sub txtSMCode_LostFocus()
    If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtSMName) = "" And Trim(txtSMCode) <> "" Then cmdPickSM_Click
End Sub

Private Sub txtTerms_Change()
'If Mode <> AddNewEdit Then Exit Sub
    If Trim(txtTerms) <> "" Or txtTerms <> vbNullString Then
        cboTerms = Trim(txtTerms)
    Else
        cboTerms.ListIndex = -1
    End If
End Sub

'Check if all mandatory fields are complete
Function MandatoryOK() As Boolean

    MandatoryOK = True

    If Trim(txtCode) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Client ID' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
        txtCode.SetFocus
        Exit Function
    End If

    If rsHeader.Status = adRecNew Then
        If IDExisting(rsHeader, "cCode", "CLIENT_CUSTOMER", Trim(rsHeader!cCode)) Then
            MandatoryOK = False
            MsgBox "Client ID already exists.", vbInformation, "ComUnion"
            txtCode.SetFocus
            Exit Function
        End If
    End If

    If Trim(txtName) = "" Then
        MandatoryOK = False
        MsgBox "Field 'Client Name' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
        txtName.SetFocus
        Exit Function
    End If

    If rsHeader!lCompany = False And rsHeader!lIndividual = False Then
        MandatoryOK = False
        MsgBox "Please select customer type (Company/Individual).", vbInformation, "ComUnion"
        chkCustomer.SetFocus
        Exit Function
    End If

    'mandatory fields for customer
    If rsHeader!lCompany = True Then
        If Trim(txtType) = "" Then
            MandatoryOK = False
            MsgBox "Field 'Customer Type' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
            cboType.SetFocus
            Exit Function
        ElseIf Trim(txtAddress) = "" Then
            MandatoryOK = False
            MsgBox "Field 'Address' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
            SSTab3.ActiveTab = 0
            txtAddress.SetFocus
            Exit Function
        ElseIf Trim(txtCountry) = "" Then
            MandatoryOK = False
            SSTab3.ActiveTab = 0
            MsgBox "Field 'Country' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
            cboCountry.SetFocus
            Exit Function
'        ElseIf Trim(txtSMCode) = "" Then
'            MandatoryOK = False
'            SSTab3.ActiveTab = 0
'            MsgBox "Field 'Salesman' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
'            txtSMCode.SetFocus
'            Exit Function
'        ElseIf Trim(txtMSCode) = "" Then
'            MandatoryOK = False
'            SSTab3.ActiveTab = 0
'            MsgBox "Field 'Market Segment' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
'            txtMSCode.SetFocus
'            Exit Function
        ElseIf Trim(txtPDCode) = "" Then
            MandatoryOK = False
            SSTab3.ActiveTab = 0
            MsgBox "Field 'Product Division' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
            txtPDCode.SetFocus
            Exit Function
        ElseIf Trim(txtIntTerms) = "" Then
            MandatoryOK = False
            SSTab3.ActiveTab = 0
            MsgBox "Field 'Internal Terms' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
            cboIntTerms.SetFocus
            Exit Function
        ElseIf Trim(txtTerms) = "" Then
            MandatoryOK = False
            SSTab3.ActiveTab = 0
            MsgBox "Field 'Terms' is mandatory. Null value is not allowed", vbInformation, "ComUnion"
            cboTerms.SetFocus
            Exit Function
'        ElseIf CDbl(txtCL) = 0 Or Trim(txtCL) = "" Then
'            If Trim(txtIntTerms) <> "COD" Then
'                MandatoryOK = False
'                SSTab3.ActiveTab = 0
'                SSTab1.ActiveTab = 1
'                MsgBox "Market segment credit limit is mandatory. Zero value is not allowed", vbInformation, "ComUnion"
'                dtgMSLimit.SetFocus
'                Exit Function
'            End If
        End If
    End If

    GetChild


    If rsMS.RecordCount <> 0 Then rsMS.MoveFirst
    Do Until rsMS.EOF
        If rsMS.Status = (adRecNew) Or rsMS.Status = (adRecModified) Then
            If IsNull(rsMS!cDescription) Then
                rsMS.Delete
            ElseIf Trim(rsMS!cDescription) = "" Then
                rsMS.Delete
            Else
                rsMS.MoveNext
            End If
        Else
            rsMS.MoveNext
        End If
    Loop

    If rsPD.RecordCount <> 0 Then rsPD.MoveFirst
    Do Until rsPD.EOF
        If rsPD.Status = (adRecNew) Or rsPD.Status = (adRecModified) Then
            If IsNull(rsPD!cDescription) Then
                rsPD.Delete
            ElseIf Trim(rsPD!cDescription) = "" Then
                rsPD.Delete
            Else
                rsPD.MoveNext
            End If
        Else
            rsPD.MoveNext
        End If
    Loop

    If rsAddress.RecordCount <> 0 Then rsAddress.MoveFirst
    Do Until rsAddress.EOF
        If rsAddress.Status = (adRecNew) Or rsAddress.Status = (adRecModified) Then
            If IsNull(rsAddress!cAddress) Then
                rsAddress.Delete
            ElseIf Trim(rsAddress!cAddress) = "" Then
                rsAddress.Delete
            Else
                rsAddress.MoveNext
            End If
        Else
            rsAddress.MoveNext
        End If
    Loop
    
    If rsBudget.RecordCount <> 0 Then rsBudget.MoveFirst
    Do Until rsAddress.EOF
        If rsBudget.Status = (adRecNew) Or rsBudget.Status = (adRecModified) Then
            If IsNull(rsBudget!cType) Then
                rsBudget.Delete
            ElseIf Trim(rsAddress!cType) = "" Then
                rsBudget.Delete
            Else
                rsBudget.MoveNext
            End If
        Else
            rsBudget.MoveNext
        End If
    Loop

    GetChild

End Function

'Filter detail recordset to header's primary
Private Sub GetChild()
On Error Resume Next
    rsMS.Filter = "cCode = '" & Trim(rsHeader!cCode) & "'"
    rsPD.Filter = "cCode = '" & Trim(rsHeader!cCode) & "'"
    rsAddress.Filter = "cCode = '" & Trim(rsHeader!cCode) & "'"
    rsBudget.Filter = "cCode = '" & Trim(rsHeader!cCode) & "'"
    
    If (ITGchkAutoPicture.Value = Checked) Then
        ITGcmdShowPicture_Click
    Else
        imgEmployee.Picture = Nothing
    End If
    
End Sub

Private Function GetSearchString() As String
On Error GoTo ErrorHandler
Dim sWhere As String

    GetSearchString = True

    If Trim$(txtCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCode LIKE '" & Trim$(txtCode.Text) & "%'"
    End If

    If Trim$(txtName.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cName LIKE '" & Trim$(txtName.Text) & "%'"
    End If
    
    If Trim(txtAddress.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cAddress LIKE '" & Trim$(txtAddress.Text) & "%'"
    End If
    
    If Trim$(txtLastName.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cLastName LIKE '" & Trim$(txtLastName.Text) & "%'"
    End If
    
    If Trim$(txtFirstName.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cFirstName LIKE '" & Trim$(txtFirstName.Text) & "%'"
    End If
    
    If Trim$(txtType.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCustomerType LIKE '" & Trim$(txtType.Text) & "%'"
    End If
    
    If Trim$(txtSMCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cSMan LIKE '" & Trim$(txtSMCode.Text) & "%'"
    End If
    
    If Trim(txtMSCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cMSCode LIKE '" & Trim$(txtMSCode.Text) & "%'"
    End If
    
    If Trim(txtPDCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cPDCode LIKE '" & Trim$(txtPDCode.Text) & "%'"
    End If
    
    If Trim(txtIntTerms.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cIntTerm LIKE '" & Trim$(txtIntTerms.Text) & "%'"
    End If
    
    If Trim(txtTerms.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cTerm LIKE '" & Trim$(txtTerms.Text) & "%'"
    End If
    
    GetSearchString = Trim$(sWhere)

    Exit Function
ErrorHandler:
    GetSearchString = "ERROR"
End Function

'Sets the form if record number is zero
Private Sub RSZero()
    lblHeader = "Customer ID - Customer Name"
    sbRS.Panels(1) = "Record: 0/0"
    sbRS.Panels(2) = ""

    Set dtgMSLimit.DataSource = Nothing
    Set dtgPDLimit.DataSource = Nothing
    Set dtgAddress.DataSource = Nothing
    dtgMSLimit.Refresh
    dtgPDLimit.Refresh
    dtgAddress.Refresh

    Set dtgHistory.DataSource = Nothing
    dtgHistory.Refresh
    dtbFrom.Text = "__/__/____"
    dtbTo.Text = "__/__/____"
    lblHold.Visible = False

    Set FrmName = Me
    UnbindControls
    TextClearing
    FormLocking True
    ITGchkAutoPicture.Enabled = True
    ITGcmdShowPicture.Enabled = True

    If rsMS.State = adStateOpen Then rsMS.Close
    If rsPD.State = adStateOpen Then rsPD.Close
    If rsAddress.State = adStateOpen Then rsAddress.Close
    If rsBudget.State = adStateOpen Then rsBudget.Close
    If rsHeader.State = adStateOpen Then rsHeader.Close

    cmdList.Enabled = True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True

    txtCode.Locked = False
    txtCode.SetFocus

    Mode = Find
End Sub

Sub SearchObj(lEnable As Boolean)
    cboType.Enabled = lEnable
    cboTaxType.Enabled = lEnable
    cboEwtType.Enabled = lEnable
    cmdPickSM.Enabled = lEnable
    cmdPickMS.Enabled = lEnable
    cmdPickPD.Enabled = lEnable
    cboIntTerms.Enabled = lEnable
    cboTerms.Enabled = lEnable
End Sub

'Show the balances of each customer
'Binding of the textboxex was disabled
Private Sub ShowCustomerBalance()
Dim rsBalance As New Recordset

    If Mode = AddNewEdit Then Exit Sub

    sSQL = "SELECT *, ISNULL((nSales - nReturns - nPaid - nCredit + nDebit), 0) AS nBalance " & _
            "FROM V_CustomerBalanceInquiry WHERE cCode = '" & rsHeader!cCode & "' AND cCompanyID = '" & COID & "'"
    rsBalance.Open sSQL, cn, adOpenForwardOnly, adLockReadOnly

    txtSales = 0
    txtDebit = 0
    txtCredit = 0
    txtReturns = 0
    txtPayment = 0
    txtBalance = 0

    If rsBalance.RecordCount <> 0 Then
        txtSales = rsBalance!nSales
        txtDebit = rsBalance!nDebit
        txtCredit = rsBalance!nCredit
        txtReturns = rsBalance!nReturns
        txtPayment = rsBalance!nPaid
        txtBalance = rsBalance!nBalance
    End If

    Set rsBalance = Nothing

End Sub

'Computes total amount of order
Public Sub ComputeTotalMSLimit()
Dim n As Double

On Error Resume Next

    If Mode <> AddNewEdit Then Exit Sub

    n = 0
    Set rs = New Recordset
    Set rs = rsMS.Clone
    rs.Filter = "cCode = '" & Trim(rsHeader!cCode) & "'"

    rs.MoveFirst
    Do Until rs.EOF
        n = n + IIf(IsNull(rs!nLimit), 0, rs!nLimit)
        rs.MoveNext
    Loop
    Set rs = Nothing

    txtCL = n

End Sub

Private Sub ITGcmdBrowsePicture_Click()
On Error Resume Next
    ' Browse for picture then load on PictureBox
    
    cd.Filter = "JPEG (*.jpg)|*.jpg| Bitmap (*.bmp)|*.bmp"
    cd.FilterIndex = 2
    cd.FileName = ""
    cd.ShowOpen

    TempPath = Trim$(cd.FileName)
    If (Trim(TempPath) <> "") Then
        imgEmployee.Picture = LoadPicture(TempPath)
    Else
        imgEmployee.Picture = Nothing
        Exit Sub
    End If

    If (imgEmployee.Picture <> 0) Then
        
        Dim stm As New ADODB.Stream
        
        stm.Type = adTypeBinary
        stm.Open
        stm.LoadFromFile TempPath
        rsHeader!Photo = stm.Read
        stm.Close
        Set stm = Nothing
    Else
        rsHeader!Photo = Null
    End If
End Sub

Private Sub ITGcmdClearPicture_Click()
On Error Resume Next
    imgEmployee.Picture = Nothing
    rsHeader!Photo = Null
End Sub

Private Sub ITGcmdShowPicture_Click()
On Error Resume Next

    If IsNull(rsHeader!Photo) Then
        imgEmployee.Picture = Nothing
        Exit Sub
    End If

    Dim stm As New ADODB.Stream
    
    stm.Type = adTypeBinary
    stm.Open
    stm.Write rsHeader!Photo
    stm.SaveToFile "c:\itgpics.tmp"
    
    imgEmployee.Picture = LoadPicture("c:\itgpics.tmp")
    Kill ("c:\itgpics.tmp")
    stm.Close
    Set stm = Nothing
End Sub

'Inserts into WHSE tables
Private Function ClientToWHSE() As Boolean
Dim rsWHSE As New ADODB.Recordset
Dim sTran As String


'On Error GoTo SalesRecieptExit
    

    cString = Trim$(rsHeader!cCode)
    
    'FOR REVISION [DO NOT DELETE BECAUSE OF THE IDENTITY] ???????????
    cn.Execute ("DELETE WHSE WHERE cCompanyID = '" & COID & "' AND cWH = '" & Trim(cString) & "'")
    
    If Trim(cboType) = "Consignee" Then
        OpenRecordset rsWHSE, "*", "WHSE", "WHERE 1 = 0"
        
        
        With rsWHSE
            .AddNew
                !cCompanyID = COID
                !cWH = cString
                !cCode = cString
                !cName = txtName
                !cAddress = txtAddress
                !cCity = txtCity
                !cState = txtState
                !cCountry = txtCountry
                !cZip = txtZip
                !cTel = txtContact
                !cFax = txtFax
                !cInternet = txtInternet
                !cEMail = txtEMail1
                !cContact = txtContact
        End With
    
        rsWHSE.UpdateBatch adAffectAll
        
        Set rsWHSE = Nothing
    End If
End Function

Private Sub SetVisibleEnable()
End Sub

